AbstractItemState<TItem> class abstract

An abstract base class representing the state of an item with generic type TItem.

This class provides properties and utility methods for handling the loading status and item data, as well as a contract for the copy method.

Implemented types
Implementers

Constructors

AbstractItemState({required ResultStatus resultStatus, TItem? item})
Constructor for creating an instance of AbstractItemState.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasItem bool
Checks if there is an item loaded.
no setter
isLoadedAny bool
Checks if any item has been loaded (either from network or cache).
no setter
isLoadedCached bool
Checks if an item has been loaded from the cache.
no setter
isLoadedNetwork bool
Checks if an item has been loaded from the network.
no setter
item ↔ TItem?
The loaded item, which can be null if no item has been loaded.
getter/setter pair
resultStatus ResultStatus
The current result status indicating the loading state of the item.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith() → dynamic
Method that must be implemented by subclasses to support copying of the state.
override
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