Skip to content

Commit 8038db6

Browse files
Merge pull request #1326 from louga31/patch-1
FormBuilderCheckbox: Add Visual density parameter
2 parents c8fb870 + 170971e commit 8038db6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/src/fields/form_builder_checkbox.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ class FormBuilderCheckbox extends FormBuilderFieldDecoration<bool> {
4040
/// When the value is null, the `contentPadding` is `EdgeInsets.symmetric(horizontal: 16.0)`.
4141
final EdgeInsets contentPadding;
4242

43+
/// Defines how compact the list tile's layout will be.
44+
///
45+
/// {@macro flutter.material.themedata.visualDensity}
46+
final VisualDensity? visualDensity;
47+
4348
/// {@macro flutter.widgets.Focus.autofocus}
4449
final bool autofocus;
4550

@@ -106,6 +111,7 @@ class FormBuilderCheckbox extends FormBuilderFieldDecoration<bool> {
106111
this.autofocus = false,
107112
this.checkColor,
108113
this.contentPadding = EdgeInsets.zero,
114+
this.visualDensity,
109115
this.controlAffinity = ListTileControlAffinity.leading,
110116
this.secondary,
111117
this.selected = false,
@@ -137,6 +143,7 @@ class FormBuilderCheckbox extends FormBuilderFieldDecoration<bool> {
137143
autofocus: autofocus,
138144
tristate: tristate,
139145
contentPadding: contentPadding,
146+
visualDensity: visualDensity,
140147
selected: selected,
141148
checkboxShape: shape,
142149
side: side,

0 commit comments

Comments
 (0)