AutoCompleteDropDownFormField<T> constructor
const
AutoCompleteDropDownFormField<T> ({
- required GlobalKey<
AutoCompleteDropDownFormFieldState< key,T> > - required List<
AutoCompleteItem< autoCompleteItems,T> > - AdeptValueController<
AutoCompleteItem< ? controller,T> > - InputEventCallback<
T> ? valueChanged, - AutoCompleteOverlayItemBuilder<
T> ? itemBuilder, - Comparator<
AutoCompleteItem< ? itemSorter,T> > - Filter<
T> ? itemFilter, - List<
TextInputFormatter> ? inputFormatters, - TextStyle? style,
- InputDecoration? decoration,
- StringCallback? textChanged,
- StringCallback? textSubmitted,
- ValueSetter<
bool> ? onFocusChanged, - TextInputType? keyboardType,
- int? autoCompleteItemsAmount,
- bool? submitOnAutoCompleteItemTap,
- bool? clearOnSubmit,
- TextInputAction? textInputAction,
- TextCapitalization? textCapitalization,
- int? minLength,
- FocusNode? focusNode,
- double? autoCompleteItemItemHeight,
- double? autoCompleteItemsBoxMaxHeight,
- bool? enabled,
Implementation
const AutoCompleteDropDownFormField({
required this.key, //GlobalKey used to enable addSuggestion etc
required this.autoCompleteItems, //Suggestions that will be displayed
this.controller,
this.valueChanged, //Callback on item selected, this is the item selected of type <T>
this.itemBuilder, //Callback to build each item, return a Widget
this.itemSorter, //Callback to sort items in the form (a of type <T>, b of type <T>)
this.itemFilter, //Callback to filter item: return true or false depending on input text
this.inputFormatters,
this.style,
this.decoration,
this.textChanged, //Callback on input text changed, this is a string
this.textSubmitted, //Callback on input text submitted, this is also a string
this.onFocusChanged,
this.keyboardType,
this.autoCompleteItemsAmount, //The amount of autoCompleteItems to show, larger values may result in them going off screen
this.submitOnAutoCompleteItemTap, //Call textSubmitted on autoCompleteItem tap, valueChanged will be called no matter what
this.clearOnSubmit, //Clear autoCompleteTextfield on submit
this.textInputAction,
this.textCapitalization,
this.minLength,
this.focusNode,
this.autoCompleteItemItemHeight,
this.autoCompleteItemsBoxMaxHeight,
this.enabled,
}) : super(key: key);