SearchHelper class abstract
Common "text-field + history" search helper.
Will emit a SearchQuery when a search is performed.
By default (with the null value), the history will be displayed.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
SearchQuery?> - SearchHelper
- Implementers
- Available extensions
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- historyKey → String
-
Key for DaoStringList, used to store the latest X queries.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showPasteFromClipboard → bool
-
no setter
- value ↔ SearchQuery?
-
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addQuery(
LocalDatabase localDatabase, String query) → Future< void> - Adds a query to the history.
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
getAllQueries(
LocalDatabase localDatabase) → List< String> - Returns all the previous queries, in reverse order.
-
getHelpText(
AppLocalizations appLocalizations) → String - A small message that will be displayed below the search bar
-
getHintText(
AppLocalizations appLocalizations) → String - Hint text for the search field.
-
getLeadingWidget(
BuildContext context) → Widget? - An optional leading widget for the search bar.
-
getPreloadedItemsTitle(
AppLocalizations appLocalizations) → String? -
getPreloadedItemsTitleIcon(
) → Widget? -
getQueriesTitleIcon(
) → Widget? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeQuery(
LocalDatabase localDatabase, String query) → Future< bool> - Removes a query from the history.
-
replaceListener(
VoidCallback listener) → void -
Available on ChangeNotifier, provided by the ChangeNotifierExtensions extension
-
search(
BuildContext context, String query, {required SearchQueryCallback searchQueryCallback}) → void - Action to perform for a search.
-
searchWithController(
BuildContext context, String query, TextEditingController controller, FocusNode focusNode) → void - Typical search when we have a controller+focus.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited