LiveSearch<T> constructor
const
LiveSearch<T> ({
- Key? key,
- required Future<
List< onSearch(T> >- String query
- required Widget itemBuilder(
- BuildContext context,
- T item
- String hint = 'Search…',
- String? label,
- Duration debounceDelay = const Duration(milliseconds: 400),
- int minChars = 1,
- int maxResults = 8,
- void onSelected(
- T item
- String emptyText = 'No results found',
- IconData icon = Icons.search_rounded,
Implementation
const LiveSearch({
super.key,
required this.onSearch,
required this.itemBuilder,
this.hint = 'Search…',
this.label,
this.debounceDelay = const Duration(milliseconds: 400),
this.minChars = 1,
this.maxResults = 8,
this.onSelected,
this.emptyText = 'No results found',
this.icon = Icons.search_rounded,
});