AutoSuggestLoaded<T> class

Loaded state with search results

Contains all the data needed to display search results and manage cache.

Inheritance

Constructors

AutoSuggestLoaded({required List<T> items, required String query, bool hasMoreResults = false, required DateTime fetchedAt, DateTime? dataExpiredAt, bool isLoadingMore = false, Object? loadMoreError})
const

Properties

dataAge Duration
Get the age of the data
no setter
dataExpiredAt DateTime?
When the data will expire (null if no expiry configured)
final
fetchedAt DateTime
When the data was fetched
final
hashCode int
The hash code for this object.
no setterinherited
hasMoreResults bool
Whether there are more results available (for pagination)
final
isDataExpired bool
Check if the cached data has expired
no setter
isLoadingMore bool
Whether currently loading more items
final
items List<T>
The search results
final
loadMoreError Object?
Error while loading more (if any)
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
query String
The query that produced these results
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
timeUntilExpiry Duration?
Time until data expires (null if no expiry or already expired)
no setter

Methods

copyWith({List<T>? items, String? query, bool? hasMoreResults, DateTime? fetchedAt, DateTime? dataExpiredAt, bool? isLoadingMore, Object? loadMoreError}) AutoSuggestLoaded<T>
Create a copy with updated values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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