WsDbState<T extends Model> class
Immutable state published by BlocWsDatabase.
It keeps only the essentials for a document-centric UI:
- loading: an activity flag for one-shot operations.
- docId: the logical identifier currently in focus (if any).
- doc: the latest materialized entity (or
nullif not loaded). - error: the last error surfaced (if any).
- isWatching: whether a realtime watch is active for docId.
You can extend this state later to add pagination or collection snapshots without breaking the current contract.
- Annotations
Constructors
Properties
- doc → T?
-
The latest document value (if loaded or received via watch).
final
- docId → String
-
The current logical document id in focus (if any).
final
- error → ErrorItem?
-
The last surfaced error (if any).
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isWatching → bool
-
Whether a realtime watch is active for docId.
final
- loading → bool
-
Whether the BLoC is performing a one-shot operation (read/write/delete).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{bool? loading, String? docId, Object? doc = _u, Object? error = _u, bool? isWatching}) → WsDbState< T> - Returns a new state with overridden fields.
-
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.
override