PerfectRawAutocomplete<T extends Object> constructor
const
PerfectRawAutocomplete<T extends Object> ({
- Key? key,
- required bool showOnTop,
- required PerfectAutocompleteOptionsViewBuilder<
T> optionsViewBuilder, - required PerfectAutocompleteOptionsBuilder<
T> optionsBuilder, - PerfectAutocompleteOptionToString<
T> displayStringForOption = defaultStringForOption, - PerfectAutocompleteFieldViewBuilder? fieldViewBuilder,
- PerfectAutocompleteOnSelected<
T> ? onSelected, - PerfectTextController? textController,
Create an instance of RawAutocomplete.
displayStringForOption
, optionsBuilder
and optionsViewBuilder
must
not be null.
Implementation
const PerfectRawAutocomplete({
super.key,
required this.showOnTop,
required this.optionsViewBuilder,
required this.optionsBuilder,
this.displayStringForOption = defaultStringForOption,
this.fieldViewBuilder,
this.onSelected,
this.textController,
}) : assert(
fieldViewBuilder != null || (key != null && textController != null),
'Pass in a fieldViewBuilder, or otherwise create a separate field and pass in the TextEditingController, and a key. Use the key with RawAutocomplete.onFieldSubmitted.',
);