File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class FormBuilderCheckbox extends StatefulWidget {
19
19
final MaterialTapTargetSize materialTapTargetSize;
20
20
final bool tristate;
21
21
final FormFieldSetter onSaved;
22
+ final EdgeInsets contentPadding;
22
23
23
24
FormBuilderCheckbox ({
24
25
Key key,
@@ -36,6 +37,7 @@ class FormBuilderCheckbox extends StatefulWidget {
36
37
this .materialTapTargetSize,
37
38
this .tristate = false ,
38
39
this .onSaved,
40
+ this .contentPadding = const EdgeInsets .all (0.0 ),
39
41
}) : super (key: key);
40
42
41
43
@override
@@ -129,7 +131,7 @@ class _FormBuilderCheckboxState extends State<FormBuilderCheckbox> {
129
131
child: ListTile (
130
132
dense: true ,
131
133
isThreeLine: false ,
132
- contentPadding: EdgeInsets . all ( 0.0 ) ,
134
+ contentPadding: widget.contentPadding ,
133
135
title: widget.label,
134
136
leading: _leading (field),
135
137
trailing: _trailing (field),
Original file line number Diff line number Diff line change @@ -10,14 +10,15 @@ class FormBuilderCheckboxList extends StatefulWidget {
10
10
final InputDecoration decoration;
11
11
final ValueChanged onChanged;
12
12
final ValueTransformer valueTransformer;
13
+ final FormFieldSetter onSaved;
13
14
14
15
final List <FormBuilderFieldOption > options;
15
16
final bool leadingInput;
16
17
final Color activeColor;
17
18
final Color checkColor;
18
19
final MaterialTapTargetSize materialTapTargetSize;
19
20
final bool tristate;
20
- final FormFieldSetter onSaved ;
21
+ final EdgeInsets contentPadding ;
21
22
22
23
FormBuilderCheckboxList ({
23
24
Key key,
@@ -35,6 +36,7 @@ class FormBuilderCheckboxList extends StatefulWidget {
35
36
this .materialTapTargetSize,
36
37
this .tristate = false ,
37
38
this .onSaved,
39
+ this .contentPadding = const EdgeInsets .all (0.0 ),
38
40
}) : super (key: key);
39
41
40
42
@override
@@ -133,7 +135,7 @@ class _FormBuilderCheckboxListState extends State<FormBuilderCheckboxList> {
133
135
ListTile (
134
136
dense: true ,
135
137
isThreeLine: false ,
136
- contentPadding: EdgeInsets . all ( 0.0 ) ,
138
+ contentPadding: widget.contentPadding ,
137
139
leading: _leading (field, i),
138
140
trailing: _trailing (field, i),
139
141
title: widget.options[i],
Original file line number Diff line number Diff line change @@ -10,14 +10,13 @@ class FormBuilderRadio extends StatefulWidget {
10
10
final InputDecoration decoration;
11
11
final ValueChanged onChanged;
12
12
final ValueTransformer valueTransformer;
13
- final bool leadingInput;
14
13
14
+ final bool leadingInput;
15
15
final List <FormBuilderFieldOption > options;
16
-
17
16
final MaterialTapTargetSize materialTapTargetSize;
18
-
19
17
final Color activeColor;
20
18
final FormFieldSetter onSaved;
19
+ final EdgeInsets contentPadding;
21
20
22
21
FormBuilderRadio ({
23
22
Key key,
@@ -33,6 +32,7 @@ class FormBuilderRadio extends StatefulWidget {
33
32
this .materialTapTargetSize,
34
33
this .activeColor,
35
34
this .onSaved,
35
+ this .contentPadding = const EdgeInsets .all (0.0 ),
36
36
}) : super (key: key);
37
37
38
38
@override
@@ -123,7 +123,7 @@ class _FormBuilderRadioState extends State<FormBuilderRadio> {
123
123
ListTile (
124
124
dense: true ,
125
125
isThreeLine: false ,
126
- contentPadding: EdgeInsets . all ( 0.0 ) ,
126
+ contentPadding: widget.contentPadding ,
127
127
leading: _leading (field, i),
128
128
title: widget.options[i],
129
129
trailing: _trailing (field, i),
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ class FormBuilderSwitch extends StatefulWidget {
62
62
/// {@macro flutter.cupertino.switch.dragStartBehavior}
63
63
final DragStartBehavior dragStartBehavior;
64
64
final FormFieldSetter onSaved;
65
+ final EdgeInsets contentPadding;
65
66
66
67
FormBuilderSwitch ({
67
68
Key key,
@@ -82,6 +83,7 @@ class FormBuilderSwitch extends StatefulWidget {
82
83
this .materialTapTargetSize,
83
84
this .dragStartBehavior = DragStartBehavior .start,
84
85
this .onSaved,
86
+ this .contentPadding = const EdgeInsets .all (0.0 ),
85
87
}) : super (key: key);
86
88
87
89
@override
@@ -148,7 +150,7 @@ class _FormBuilderSwitchState extends State<FormBuilderSwitch> {
148
150
child: ListTile (
149
151
dense: true ,
150
152
isThreeLine: false ,
151
- contentPadding: EdgeInsets . all ( 0.0 ) ,
153
+ contentPadding: widget.contentPadding ,
152
154
title: widget.label,
153
155
trailing: Switch (
154
156
value: field.value,
You can’t perform that action at this time.
0 commit comments