PerfectAutocomplete<T extends Object> constructor
PerfectAutocomplete<T extends Object> ({
- Key? key,
- PerfectTextController? textController,
- required PerfectAutocompleteOptionsBuilder<
T> optionsBuilder, - AutocompleteOptionToString<
T> displayStringForOption = RawAutocomplete.defaultStringForOption, - Widget fieldViewBuilder(
- BuildContext context,
- PerfectTextController textController,
- VoidCallback onFieldSubmitted
- PerfectAutocompleteOnSelected<
T> ? onSelected, - double optionsWidth = 200.0,
- double optionsMaxHeight = 200.0,
- PerfectAutocompleteOptionBuilder<
T> ? optionBuilder, - 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();