【发布时间】:2021-01-19 09:02:49
【问题描述】:
FormBuilder 未将初始提供的列表显示为表单中的选中值。虽然在提交表单时,初始提供的列表可以看作是其芯片属性的值。
FormBuilderFilterChip(
attribute: "strAttr",
initialValue: ['abc', 'def'],
options: ['xyz', 'pqr']
.map((e) => FormBuilderFieldOption(
value: e,
child: Text("$e")
)).toList(),
),
当表单被加载时,它只显示为 xyz,pqr 值而不添加初始值
如果表单已提交,则在打印时不选择表单上的任何值
print(map['strAttr']);
[abc, def]
根据我的理解,加载表单时,“xyz”、“pqr”、“abc”、“def”应该显示在表单上,其中“abc”和“def”值已在表单中检查。
如果理解有问题,请告诉我,或者如何实现
谢谢!!!
【问题讨论】:
标签: flutter dart flutter-form-builder