SearchHistoryItem class

Represents a historical search query.

This class stores information about past searches including the query text, timestamp, and usage count for ranking recent searches.

Inheritance
Annotations

Constructors

SearchHistoryItem.new({required String query, required DateTime timestamp, int count = 1})
Creates a search history item.

Properties

box BoxBase?
Get the box in which this object is stored. Returns null if object has not been added to a box yet.
no setterinherited
count int
Number of times this query has been searched.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isInBox bool
Returns whether this object is currently stored in a box.
no setterinherited
key → dynamic
Get the key associated with this object. Returns null if object has not been added to a box yet.
no setterinherited
query String
The search query text.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
When this search was last performed.
getter/setter pair

Methods

delete() Future<void>
Deletes this object from the box it is stored in.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordUsage() → void
Increments the usage count and updates timestamp.
save() Future<void>
Persists this object.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited