SearchProvider class abstract
Contract for implementing custom search backends.
Implement this abstract class to provide search functionality from various data sources such as local databases, REST APIs, or in-memory collections. The package will use your implementation to fetch search results and suggestions.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearCache(
) → Future< void> - Clears any cached search data.
-
getSuggestions(
String query) → Future< List< SearchItem> > - Provides search suggestions based on partial input.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onItemSelected(
SearchItem item) → Future< void> - Notifies the provider that a search item was selected.
-
search(
String query, {int limit = 20, int offset = 0, CancellationToken? cancellationToken}) → Future< SearchResult> - Performs a search operation.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited