PerfectAutocomplete<T extends Object> constructor

PerfectAutocomplete<T extends Object>({
  1. Key? key,
  2. PerfectTextController? textController,
  3. required PerfectAutocompleteOptionsBuilder<T> optionsBuilder,
  4. AutocompleteOptionToString<T> displayStringForOption = RawAutocomplete.defaultStringForOption,
  5. Widget fieldViewBuilder(
    1. BuildContext context,
    2. PerfectTextController textController,
    3. VoidCallback onFieldSubmitted
    ) = _defaultFieldViewBuilder,
  6. PerfectAutocompleteOnSelected<T>? onSelected,
  7. double optionsWidth = 200.0,
  8. double optionsMaxHeight = 200.0,
  9. PerfectAutocompleteOptionBuilder<T>? optionBuilder,
  10. bool showOnTop = false,
})

Creates an instance of PerfectAutocomplete.

Implementation

PerfectAutocomplete({
  super.key,
  PerfectTextController? textController,
  required this.optionsBuilder,
  this.displayStringForOption = RawAutocomplete.defaultStringForOption,
  this.fieldViewBuilder = _defaultFieldViewBuilder,
  this.onSelected,
  this.optionsWidth = 200.0,
  this.optionsMaxHeight = 200.0,
  this.optionBuilder,
  this.showOnTop = false,
}) : _textController = textController ?? PerfectTextController();