bloc_subject library

Classes

BlocSubject<Event, State>
A BehaviorSubject that handles Events and modify the State based on the Events.

Extensions

BlocRxDartOnBehaviorSubject on BehaviorSubject<State>

Typedefs

EmptyHandler<Event, State> = FutureOr<State?> Function(Event event)
Empty State handler. In some cases it is possible for an Event to be received before the first State is set. This is the callback for these cases. To avoid this, when needed, consider using waitForState before adding any Events. See BlocSubject.defaultEmptyHandler for modifying the default implementation.
EventsModifier<Event> = Stream<Event> Function(Stream<Event> events)
Used to modify the event stream such a debouncing. Applied to all events - addEvent or listenToEvents.
Handler<Event, State> = FutureOr<State?> Function(Event event, State state)
Handler for Events.