PrismSearch<T> constructor
- Key? key,
- List<
T> ? items, - Future<
List< onSearch(T> >- String query
- required String itemLabel(
- T item
- ValueChanged<
T> ? onSelected, - String hintText = 'Search…',
- Duration? debounce,
- int maxSuggestions = 8,
- PrismSearchHighlightStyle? highlightStyle,
- InputDecoration? fieldDecoration,
- bool debugCompactOverride = false,
Creates an adaptive search.
Implementation
const PrismSearch({
super.key,
this.items,
this.onSearch,
required this.itemLabel,
this.onSelected,
this.hintText = 'Search…',
this.debounce,
this.maxSuggestions = 8,
this.highlightStyle,
this.fieldDecoration,
this.debugCompactOverride = false,
}) : assert(
(items != null) != (onSearch != null),
'Provide exactly one of items or onSearch.',
);