PerfectRawAutocomplete<T extends Object> constructor

const PerfectRawAutocomplete<T extends Object>({
  1. Key? key,
  2. required bool showOnTop,
  3. required PerfectAutocompleteOptionsViewBuilder<T> optionsViewBuilder,
  4. required PerfectAutocompleteOptionsBuilder<T> optionsBuilder,
  5. PerfectAutocompleteOptionToString<T> displayStringForOption = defaultStringForOption,
  6. PerfectAutocompleteFieldViewBuilder? fieldViewBuilder,
  7. PerfectAutocompleteOnSelected<T>? onSelected,
  8. 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.',
      );