AlertBloc class

Needs to be added up the Widget tree and have the stream be listened to.

YOu can look at AlertWatcher for an automatic implementation of this.

Constructors

AlertBloc({required BlocEventChannel? parentChannel})
Add this up the widget tree and listen to the stream to receive the alerts.

Properties

blocUpdated List<void Function()>
Add functions to this to be ran when the Bloc is updated.
getter/setter pairinherited
eventChannel → BlocEventChannel
Events that the UI fire to affect this Bloc are received through here.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<AlertInfo>
The stream for the alerts that occur.
no setter

Methods

dispose() → void
Disposes this value to save memory. Implementations should be idempotent.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateBloc() → void
Signal that this Bloc has been updated. This will call all listeners added to blocUpdated.
inherited
updateBlocOnChange({required dynamic change(), required List tracker()}) → void
Updates the Bloc after calling change if the value returned by tracker changes.
inherited
updateBlocOnFutureChange({required Future change(), required List tracker()}) Future<void>
Updates the Bloc after calling change if the value returned by tracker changes.
inherited

Operators

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