stateful_data_flutter
library
Classes
-
CachedDirty
-
The value comes from cache and may not reflect the current backend state.
-
Dirty<T, E extends Object>
-
Local edits or cached data that differ from the last confirmed backend state.
-
DirtyKind
-
Base class for describing why a value is considered "dirty".
-
EditedDirty
-
The value was modified locally and is not yet validated or saved.
-
Empty<T, E extends Object>
-
The resource exists but is empty (e.g. empty list / no data).
-
Failure<T, E extends Object>
-
The last operation failed.
-
Loading<T, E extends Object>
-
A load from backend/storage is in progress.
-
Ready<T, E extends Object>
-
Successfully loaded value, ready for consumption.
-
StatefulData<T, E extends Object>
-
StatefulData - declarative lifecycle wrapper for a value of type
T.
-
StatefulDataBuilder<T, E extends Object>
-
Builds UI based on a StatefulData<T, E> lifecycle.
-
StatefulDataStreamBuilder<T, E extends Object>
-
Same as StatefulDataBuilder, but takes a Stream of StatefulData.
-
Uninitialized<T, E extends Object>
-
No attempt to load yet (initial state).
-
Updating<T, E extends Object>
-
An update to backend is in progress (PATCH/PUT/POST).
-
ValidatedDirty
-
The value was modified locally and was validated but not yet started uploading / saved.
Typedefs
-
ShimmerBuilder
= Widget Function()
-
Shimmer / skeleton / placeholder while there is no value yet (or initial load).
-
StatefulFailureBuilder<T, E extends Object>
= Widget Function(E error)
-
Called when we are in a failure state and there is no previous value
(or you want a dedicated error UI).
-
StatefulValueBuilder<T, E extends Object>
= Widget Function(T value, bool inProgress, {E? error})
-
Called when we have a value to show.
inProgress is true when we are in a loading/updating state but can still show value.
error is provided when we are in a failure state but still have a previous value.