Pretty sure it was missing in the original "DropdownButtonFormField" as well at the beginning but it has a focusNode now
DropdownButtonFormField({
Key key,
@required List<DropdownMenuItem<T>> items,
DropdownButtonBuilder selectedItemBuilder,
T value,
Widget hint,
Widget disabledHint,
@required this.onChanged,
VoidCallback onTap,
int elevation = 8,
TextStyle style,
Widget icon,
Color iconDisabledColor,
Color iconEnabledColor,
double iconSize = 24.0,
bool isDense = true,
bool isExpanded = false,
double itemHeight,
Color focusColor,
FocusNode focusNode,
bool autofocus = false,
Color dropdownColor,
InputDecoration decoration,
FormFieldSetter<T> onSaved,
FormFieldValidator<T> validator,
bool autovalidate = false,
})
Compared to FormBuilderDropdown:
FormBuilderDropdown({
Key key,
@required this.attribute,
@required this.items,
this.validators = const [],
this.readOnly = false,
this.decoration = const InputDecoration(),
this.isExpanded = true,
this.isDense = true,
this.elevation = 8,
this.iconSize = 24.0,
this.hint,
this.initialValue,
this.style,
this.disabledHint,
this.onChanged,
this.valueTransformer,
this.underline,
this.icon,
this.iconDisabledColor,
this.iconEnabledColor,
this.allowClear = false,
this.clearIcon = const Icon(Icons.close),
this.onSaved,
})
I've just stumbled across this too... see https://github.com/danvick/flutter_form_builder/issues/153. Looks like it's been missing for a while
Fixed in v3.11.5
Most helpful comment
Fixed in v3.11.5