Autocomplete<T extends Object> constructor Null safety

const Autocomplete<T extends Object>(
  1. {Key? key,
  2. required AutocompleteOptionsBuilder<T> optionsBuilder,
  3. AutocompleteOptionToString<T> displayStringForOption = RawAutocomplete.defaultStringForOption,
  4. AutocompleteFieldViewBuilder fieldViewBuilder = _defaultFieldViewBuilder,
  5. AutocompleteOnSelected<T>? onSelected,
  6. double optionsMaxHeight = 200.0,
  7. AutocompleteOptionsViewBuilder<T>? optionsViewBuilder,
  8. TextEditingValue? initialValue}
)

Creates an instance of Autocomplete.

Implementation

const Autocomplete({
  super.key,
  required this.optionsBuilder,
  this.displayStringForOption = RawAutocomplete.defaultStringForOption,
  this.fieldViewBuilder = _defaultFieldViewBuilder,
  this.onSelected,
  this.optionsMaxHeight = 200.0,
  this.optionsViewBuilder,
  this.initialValue,
}) : assert(displayStringForOption != null),
     assert(optionsBuilder != null);