Ready<T, E extends Object> class
final
Successfully loaded value, ready for consumption.
- Inheritance
-
- Object
- StatefulData<
T, E> - Ready
- Available extensions
Constructors
- Ready(T _value)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
no setteroverride
Methods
-
either<
R> (R onValue(T value), R onNoValue(E? failure)) → R -
Collapse the full lifecycle into just two branches:
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
statefulBuilder(
{Key? key, required ShimmerBuilder shimmer, required StatefulValueBuilder< T, E> builder, required StatefulFailureBuilder<T, E> failureBuilder, required Widget emptyBuilder()}) → Widget -
Available on StatefulData<
Convenience wrapper so you can do:T, E> , provided by the StatefulDataWidgetX extension -
toDirty(
T newValue, {DirtyKind kind = const EditedDirty(), DateTime? dirtyAt}) → Dirty< T, E> -
Transition to Dirty, marking this value as locally modified or cached.
inherited
-
toFailure(
E failure) → Failure< T, E> -
Transition to Failure, preserving the best previous value if any.
inherited
-
toLoading(
{Future< bool> ? future, Completer<T> ? completer}) → Loading<T, E> -
Transition to Loading, carrying the best available previous value.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toUpdating(
T newValue, {Future< bool> ? future, Completer<T> ? completer}) → Updating<T, E> -
Transition to Updating, keeping previous context for optimistic UI.
inherited
-
valueOrNull(
) → T? -
Returns the best available usable value, or null if none.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited