Skip to content

Commit 0672f22

Browse files
committed
Bug Fix: FormBuilderFieldOption may not have a child -- the option is the widget.
1 parent c8fe0fc commit 0672f22

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/src/fields/form_builder_choice_chips.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ class FormBuilderChoiceChip<T> extends FormBuilderField<T> {
309309
children: <Widget>[
310310
for (FormBuilderFieldOption<T> option in options)
311311
ChoiceChip(
312-
label: option.child,
312+
label: option,
313313
selected: field.value == option.value,
314314
onSelected: state.readOnly
315315
? null

lib/src/fields/form_builder_filter_chips.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class FormBuilderFilterChip<T> extends FormBuilderField<List<T>> {
107107
children: <Widget>[
108108
for (FormBuilderFieldOption<T> option in options)
109109
FilterChip(
110-
label: option.child,
110+
label: option,
111111
selected: field.value.contains(option.value),
112112
onSelected: (state.readOnly ||
113113
(maxChips != null &&

lib/src/widgets/grouped_checkbox.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class _GroupedCheckboxState<T> extends State<GroupedCheckbox<T>> {
277277
tristate: widget.tristate,
278278
onChanged: isOptionDisabled
279279
? null
280-
: (bool selected) {
280+
: (selected) {
281281
selected
282282
? selectedListItems.add(optionValue)
283283
: selectedListItems.remove(optionValue);

0 commit comments

Comments
 (0)