AutoCompleteDropDownFormField<T> constructor

const AutoCompleteDropDownFormField<T>({
  1. required GlobalKey<AutoCompleteDropDownFormFieldState<T>> key,
  2. required List<AutoCompleteItem<T>> autoCompleteItems,
  3. AdeptValueController<AutoCompleteItem<T>>? controller,
  4. InputEventCallback<T>? valueChanged,
  5. AutoCompleteOverlayItemBuilder<T>? itemBuilder,
  6. Comparator<AutoCompleteItem<T>>? itemSorter,
  7. Filter<T>? itemFilter,
  8. List<TextInputFormatter>? inputFormatters,
  9. TextStyle? style,
  10. InputDecoration? decoration,
  11. StringCallback? textChanged,
  12. StringCallback? textSubmitted,
  13. ValueSetter<bool>? onFocusChanged,
  14. TextInputType? keyboardType,
  15. int? autoCompleteItemsAmount,
  16. bool? submitOnAutoCompleteItemTap,
  17. bool? clearOnSubmit,
  18. TextInputAction? textInputAction,
  19. TextCapitalization? textCapitalization,
  20. int? minLength,
  21. FocusNode? focusNode,
  22. double? autoCompleteItemItemHeight,
  23. double? autoCompleteItemsBoxMaxHeight,
  24. 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);