File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ class _FormBuilderCheckboxState extends State<FormBuilderCheckbox> {
64
64
65
65
Widget _checkbox (FormFieldState <dynamic > field) {
66
66
return Checkbox (
67
- value: field.value ?? false ,
67
+ value: ( field.value == null && ! widget.tristate) ? false : field.value ,
68
68
activeColor: widget.activeColor,
69
69
checkColor: widget.checkColor,
70
70
materialTapTargetSize: widget.materialTapTargetSize,
@@ -96,7 +96,7 @@ class _FormBuilderCheckboxState extends State<FormBuilderCheckbox> {
96
96
return FormField (
97
97
key: _fieldKey,
98
98
enabled: ! _readOnly,
99
- initialValue: _initialValue ?? false ,
99
+ initialValue: _initialValue,
100
100
validator: (val) {
101
101
for (int i = 0 ; i < widget.validators.length; i++ ) {
102
102
if (widget.validators[i](val) != null )
You can’t perform that action at this time.
0 commit comments