You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I tried to tap on the checkbox I got following exception:
I/flutter ( 6016): ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
I/flutter ( 6016): The following UnsupportedError was thrown while handling a gesture:
I/flutter ( 6016): Unsupported operation: Cannot add to an unmodifiable list
I/flutter ( 6016):
I/flutter ( 6016): When the exception was thrown, this was the stack:
I/flutter ( 6016): #0 UnmodifiableListBase.add (dart:_internal/list.dart:114:5)
I/flutter ( 6016): #1 _FormBuilderCheckboxListState._checkbox.
Please help.
The text was updated successfully, but these errors were encountered:
This is my code for FormBuilderCheckboxlist:
return FormBuilderCheckboxList(
attribute: attribute,
options: options,
//initialValue: null,
decoration: InputDecoration(
labelText: _labelText(),
labelStyle: TextStyle(
color: Color(0xFF4574EC),
),
border: InputBorder.none,
),
leadingInput: true,
validators: mandatory
? [
FormBuilderValidators.required(
errorText: 'Please select $title',
)
]
: [],
onChanged: onChanged,
);
my calling:
MyCheckbox(
attribute: 'treatment',
mandatory: false,
title: 'Treatment received',
options: ['IV Fluids', 'Antibiotics', 'ORS']
.map(
(treatment) => FormBuilderFieldOption(value: treatment),
)
.toList(growable: false),
onChanged: (dynamic val) {
print('treatmentreceived=$val');
setState(() {
_treatment = val;
});
},
)
my UI http://prntscr.com/ntasjk
Whenever I tried to tap on the checkbox I got following exception:
I/flutter ( 6016): ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
I/flutter ( 6016): The following UnsupportedError was thrown while handling a gesture:
I/flutter ( 6016): Unsupported operation: Cannot add to an unmodifiable list
I/flutter ( 6016):
I/flutter ( 6016): When the exception was thrown, this was the stack:
I/flutter ( 6016): #0 UnmodifiableListBase.add (dart:_internal/list.dart:114:5)
I/flutter ( 6016): #1 _FormBuilderCheckboxListState._checkbox.
Please help.
The text was updated successfully, but these errors were encountered: