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> {
218218 /// are defined by the corresponding properties of the [borderRadius] .
219219 final BorderRadius ? borderRadius;
220220
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+
221230 /// Creates field for Dropdown button
222231 FormBuilderDropdown ({
223232 super .key,
@@ -253,6 +262,7 @@ class FormBuilderDropdown<T> extends FormBuilderFieldDecoration<T> {
253262 this .enableFeedback,
254263 this .borderRadius,
255264 this .alignment = AlignmentDirectional .centerStart,
265+ this .hint,
256266 }) : super (
257267 builder: (FormFieldState <T ?> field) {
258268 final state = field as _FormBuilderDropdownState <T >;
@@ -289,6 +299,7 @@ class FormBuilderDropdown<T> extends FormBuilderFieldDecoration<T> {
289299 borderRadius: borderRadius,
290300 enableFeedback: enableFeedback,
291301 alignment: alignment,
302+ hint: hint,
292303 );
293304 },
294305 );
You can’t perform that action at this time.
0 commit comments