ResourceState<K extends Object, V> class
- Inheritance
-
- Object
- StateSnapshot<
V> - ResourceState
- Available extensions
Constructors
- ResourceState.initial(K? key, {required bool isLoading})
- ResourceState.withError(Object error, {required K? key, required bool isLoading})
- ResourceState.withValue(K key, V value, {required bool isLoading, required Source source})
- ResourceState.withValueAndError(K key, V value, Object error, {required Source source, required bool isLoading})
Properties
- error → Object?
-
finalinherited
- hasError → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasKey → bool
-
no setter
- hasValue → bool
-
no setterinherited
- isLoading → bool
-
finalinherited
- key → K?
-
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setteroverride
- requireError → Object
-
Available on StateSnapshot<
V> , provided by the StateSnapshotExtensions extensionno setter - requireKey → K
-
Available on ResourceState<
K, V> , provided by the ResourceStateRequireExtensions extensionno setter - requireSource → Source
-
Available on StateSnapshot<
V> , provided by the StateSnapshotExtensions extensionno setter - requireValue → V
-
Available on StateSnapshot<
V> , provided by the StateSnapshotExtensions extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → Source?
-
finalinherited
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited - value → V?
-
finalinherited
Methods
-
copyWith(
{bool? isLoading, bool includeValue = true, bool includeError = true}) → ResourceState< K, V> -
override
-
copyWithError(
Object error, {bool? isLoading, bool includeValue = true}) → ResourceState< K, V> -
override
-
copyWithValue(
V value, {required Source source, bool? isLoading, bool includeError = true}) → ResourceState< K, V> -
override
-
map<
N> (N callback(V value)) → ResourceState< K, N> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited