File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/flutter_form_builder/lib/src/fields Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,17 @@ class FormBuilderDropdown<T> extends FormBuilderField<T> {
181
181
final bool allowClear;
182
182
final Widget clearIcon;
183
183
184
+ /// The maximum height of the menu.
185
+ ///
186
+ /// The maximum height of the menu must be at least one row shorter than
187
+ /// the height of the app's view. This ensures that a tappable area
188
+ /// outside of the simple menu is present so the user can dismiss the menu.
189
+ ///
190
+ /// If this property is set above the maximum allowable height threshold
191
+ /// mentioned above, then the menu defaults to being padded at the top
192
+ /// and bottom of the menu by at one menu item's height.
193
+ final double ? menuMaxHeight;
194
+
184
195
/// Creates field for Dropdown button
185
196
FormBuilderDropdown ({
186
197
Key ? key,
@@ -215,6 +226,7 @@ class FormBuilderDropdown<T> extends FormBuilderField<T> {
215
226
this .focusColor,
216
227
this .itemHeight = kMinInteractiveDimension,
217
228
this .selectedItemBuilder,
229
+ this .menuMaxHeight,
218
230
}) : /*: assert(allowClear == true || clearIcon != null)*/ super (
219
231
key: key,
220
232
initialValue: initialValue,
@@ -278,6 +290,7 @@ class FormBuilderDropdown<T> extends FormBuilderField<T> {
278
290
focusColor: focusColor,
279
291
itemHeight: itemHeight,
280
292
selectedItemBuilder: selectedItemBuilder,
293
+ menuMaxHeight: menuMaxHeight,
281
294
),
282
295
),
283
296
),
You can’t perform that action at this time.
0 commit comments