NimbostratusStateBloc<T> class

Inheritance

Constructors

NimbostratusStateBloc([NimbostratusDocumentSnapshot<T>? initialValue])

Properties

changes Stream<StateChangeTuple<NimbostratusDocumentSnapshot<T>?>>
Returns a stream that emits all of changes to the value of the StateBloc as a StateChangeTuple containing the StateChangeTuple.current and StateChangeTuple.previous value.
no setterinherited
current Future<NimbostratusDocumentSnapshot<T>?>
A Future that waits for a value to be added to the StateBloc. Completes with the current value if the StateBloc already has a value.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
Returns whether the StateBloc's stream controller is able to receive new events or has been closed.
no setterinherited
next Future<NimbostratusDocumentSnapshot<T>?>
A Future that waits for the next value to be added to the StateBloc.
no setterinherited
nonNullStream Stream<NimbostratusDocumentSnapshot<T>>
Returns a stream that emits all of the non-null updates to the value held by the StateBloc, starting with the current value.
no setterinherited
previousValue NimbostratusDocumentSnapshot<T>?
The previous value of the StateBloc.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<NimbostratusDocumentSnapshot<T>?>
Returns a stream that emits all of the updates to the value held by the StateBloc, starting with the current value.
no setterinherited
value NimbostratusDocumentSnapshot<T>?
The current value of the StateBloc.
getter/setter pairinherited

Methods

add(NimbostratusDocumentSnapshot<T>? snap) → void
Updates the current value of the StateBloc to the provided value.
override
close() → dynamic
Closes the StreamController for the StateBloc. No further items will be emitted by the StateBloc Stream or Future interfaces.
inherited
dispose() → dynamic
Disposes all resources held by the StateBloc.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rollback(NimbostratusDocumentSnapshot<T> snap) → void
Rolls back the supplied optimistic snapshot. If the snapshot being rolled back is the current value on the stream, then the snapshot that was chronologically emitted before it becomes the most logical current value for the stream and it is replayed on the stream.
setValue(void updateFn(NimbostratusDocumentSnapshot<T>? currentValue)) → void
Executes the provided updateFn and then re-emits the updated value on the stream. Consider the following example where the current value is updated:
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited