Skip to content

Commit e25df8c

Browse files
Add | final widget hint
1 parent dde5efd commit e25df8c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/src/fields/form_builder_dropdown.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff 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,7 +262,7 @@ class FormBuilderDropdown<T> extends FormBuilderFieldDecoration<T> {
253262
this.enableFeedback,
254263
this.borderRadius,
255264
this.alignment = AlignmentDirectional.centerStart,
256-
Widget? hint,
265+
this.hint,
257266
}) : super(
258267
builder: (FormFieldState<T?> field) {
259268
final state = field as _FormBuilderDropdownState<T>;

0 commit comments

Comments
 (0)