File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,15 @@ class FormBuilderDropdown<T> extends FormBuilderFieldDecoration<T> {
218
218
/// are defined by the corresponding properties of the [borderRadius] .
219
219
final BorderRadius ? borderRadius;
220
220
221
+ /// A placeholder widget that is displayed by the dropdown button.
222
+ ///
223
+ /// If [value] is null and the dropdown is enabled ([items] and [onChanged] are non-null),
224
+ /// this widget is displayed as a placeholder for the dropdown button's value.
225
+ ///
226
+ /// If [value] is null and the dropdown is disabled and [disabledHint] is null,
227
+ /// this widget is used as the placeholder.
228
+ final Widget ? hint;
229
+
221
230
/// Creates field for Dropdown button
222
231
FormBuilderDropdown ({
223
232
super .key,
@@ -253,6 +262,7 @@ class FormBuilderDropdown<T> extends FormBuilderFieldDecoration<T> {
253
262
this .enableFeedback,
254
263
this .borderRadius,
255
264
this .alignment = AlignmentDirectional .centerStart,
265
+ this .hint,
256
266
}) : super (
257
267
builder: (FormFieldState <T ?> field) {
258
268
final state = field as _FormBuilderDropdownState <T >;
@@ -289,6 +299,7 @@ class FormBuilderDropdown<T> extends FormBuilderFieldDecoration<T> {
289
299
borderRadius: borderRadius,
290
300
enableFeedback: enableFeedback,
291
301
alignment: alignment,
302
+ hint: hint,
292
303
);
293
304
},
294
305
);
You can’t perform that action at this time.
0 commit comments