@@ -6,7 +6,7 @@ class FormBuilderCheckboxList extends StatefulWidget {
6
6
final String attribute;
7
7
final List <FormFieldValidator > validators;
8
8
final dynamic initialValue;
9
- final bool readonly ;
9
+ final bool readOnly ;
10
10
final InputDecoration decoration;
11
11
final ValueChanged onChanged;
12
12
final ValueTransformer valueTransformer;
@@ -23,7 +23,7 @@ class FormBuilderCheckboxList extends StatefulWidget {
23
23
@required this .options,
24
24
this .initialValue = const [],
25
25
this .validators = const [],
26
- this .readonly = false ,
26
+ this .readOnly = false ,
27
27
this .leadingInput = false ,
28
28
this .decoration = const InputDecoration (),
29
29
this .onChanged,
@@ -40,7 +40,7 @@ class FormBuilderCheckboxList extends StatefulWidget {
40
40
}
41
41
42
42
class _FormBuilderCheckboxListState extends State <FormBuilderCheckboxList > {
43
- bool _readonly = false ;
43
+ bool _readOnly = false ;
44
44
final GlobalKey <FormFieldState > _fieldKey = GlobalKey <FormFieldState >();
45
45
FormBuilderState _formState;
46
46
dynamic _initialValue;
@@ -66,7 +66,7 @@ class _FormBuilderCheckboxListState extends State<FormBuilderCheckboxList> {
66
66
materialTapTargetSize: widget.materialTapTargetSize,
67
67
tristate: widget.tristate,
68
68
value: field.value.contains (widget.options[i].value),
69
- onChanged: _readonly
69
+ onChanged: _readOnly
70
70
? null
71
71
: (bool value) {
72
72
FocusScope .of (context).requestFocus (FocusNode ());
@@ -93,11 +93,11 @@ class _FormBuilderCheckboxListState extends State<FormBuilderCheckboxList> {
93
93
94
94
@override
95
95
Widget build (BuildContext context) {
96
- _readonly = (_formState? .readonly == true ) ? true : widget.readonly ;
96
+ _readOnly = (_formState? .readOnly == true ) ? true : widget.readOnly ;
97
97
98
98
return FormField (
99
99
key: _fieldKey,
100
- enabled: ! _readonly ,
100
+ enabled: ! _readOnly ,
101
101
initialValue: _initialValue ?? [],
102
102
validator: (val) {
103
103
for (int i = 0 ; i < widget.validators.length; i++ ) {
@@ -125,7 +125,7 @@ class _FormBuilderCheckboxListState extends State<FormBuilderCheckboxList> {
125
125
trailing: _trailing (field, i),
126
126
title: Text (
127
127
"${widget .options [i ].label ?? widget .options [i ].value }" ),
128
- onTap: _readonly
128
+ onTap: _readOnly
129
129
? null
130
130
: () {
131
131
var currentValue = field.value;
@@ -145,7 +145,7 @@ class _FormBuilderCheckboxListState extends State<FormBuilderCheckboxList> {
145
145
}
146
146
return InputDecorator (
147
147
decoration: widget.decoration.copyWith (
148
- enabled: ! _readonly ,
148
+ enabled: ! _readOnly ,
149
149
errorText: field.errorText,
150
150
contentPadding: EdgeInsets .only (top: 10.0 , bottom: 0.0 ),
151
151
border: InputBorder .none,
0 commit comments