BaseBloc class abstract
The bloc holds the state of the widget
listens BaseWidget
SubClass's events
emits states to the widget
Constructors
- BaseBloc()
Properties
-
baseState
→ Stream<
BaseBlocPrimaryState> -
used by the
BaseWidget
to listen to the bloc BaseBlocPrimaryState statesno setter -
event
→ Sink<
BaseBlocEvent> -
used by the
BaseWidget
add BaseBlocEvents BaseBlocEvent must be extendedno setter - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sinkState
→ Sink<
BaseBlocPrimaryState> ? -
no setter
Methods
-
dispose(
) → dynamic -
getStreamOfType<
T extends BaseBlocDataState> () → Stream< T> - Use this to listen events emitted by the BaseBloc
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onUiDataChange(
BaseBlocEvent event) → void - Events emitted by the widget bloc.event.add(BaseBlocEvent(data)) will be captured here
-
postUiEvent(
BaseBlocEvent event) → void -
registerStreams(
List< Stream> streams) → void - register streams that extend BaseBlocDataState to _secondaryStreams You can listen to them from the widget side within a StreamBuilder get the reference stream using bloc.getStreamOfType
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited