AutoPersistedBloc<S> class
abstract
If bloc is not a singleton then tags must be provided to differentiate between different instances, otherwise different instances will overwrite each other
- Inheritance
-
- Object
- Bloc<
S> - PersistedBloc<
S> - AutoPersistedBloc
Constructors
- AutoPersistedBloc.new({S? initialState, dynamic tag, BlocMonitor monitor = const BlocEventsPrinter()})
Properties
- error → StateError
-
no setterinherited
- hasError → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBusy → bool
-
no setterinherited
- persistenceService → PersistenceService
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → S
-
no setterinherited
-
stream
→ Stream<
S?> -
Broadcast Stream to which all builders listen
no setterinherited
- tag → Object
-
finalinherited
Methods
-
close(
) → Future< void> -
Send a done event and disposes the stream
inherited
-
nextState(
S? currentState, S update) → S? -
Called to calculate the new state
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → void -
Broadcasts the same state
inherited
-
setBusy(
{String? event}) → void -
Called by blocs (subclasses) when the updated state isn't available immediately
inherited
-
setError(
dynamic error, {String? event}) → void -
Called by blocs (subclasses) when an error occurs
inherited
-
setState(
S update, {String? event}) → void -
Called by blocs (subclasses) when the state is updated
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited