NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #261 most downloaded on pub.dev
A predictable state management library that helps implement the BLoC (Business Logic Component) design pattern.
Last release 4 months ago
12 May 2026
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
115 releases · first in 2018
fix: isClosed should incorporate event controller state
isClosed should incorporate event controller state (#4809)docs: minor README.md improvements
One column per quarter.
docs: add onDone to README and example
refactor: analysis options updates
BREAKING refactor!: remove deprecated BlocOverrides
- docs: improve diagrams - chore: update copyright year - chore: update sponsors
chore: fix require_trailing_commas
docs: upgrade README snippets to Dart 3
remove deprecated invariant_booleans lint rule
feat: reintroduce Bloc.observer and Bloc.transformer
refactor: resolve analysis warnings
fix: make onChange and addError protected
fix: allow emit usage within tests
emit usage within tests (#2982)BREAKING: refactor: remove deprecated TransitionFunction
BlocOverrides API (#2932)
Bloc.observer removed in favor of BlocOverrides.runZoned and BlocOverrides.current.blocObserverBloc.transformer removed in favor of BlocOverrides.runZoned and BlocOverrides.current.eventTransformerBlocObserver an abstract classadd throws StateError when bloc is closed (#2912)emit throws StateError when bloc is closed (#2913)BlocUnhandledErrorException is removedonError and rethrownaddError reports error to onError but does not propagate as an uncaught exceptionemit in Bloc and Cubit
Cubit, emit is protected so it can only be used within the Cubit instance.Bloc, emit is internal so it cannot be used outside of the internal package implementation.TransitionFunctiontransformEventsmapEventToStatetransformTransitionslisten on BlocBaseStateError if an event is added without a registered event handlerBREAKING: feat: introduce BlocOverrides API
BlocOverrides API (#2932)
Bloc.observer removed in favor of BlocOverrides.runZoned and BlocOverrides.current.blocObserverBloc.transformer removed in favor of BlocOverrides.runZoned and BlocOverrides.current.eventTransformerBlocObserver an abstract classadd throws StateError when bloc is closed (#2912)emit throws StateError when bloc is closed (#2913)BREAKING: feat: improve error handling/reporting
BlocUnhandledErrorException is removedonError and rethrownaddError reports error to onError but does not propagate as an uncaught exceptionBREAKING: feat: restrict scope of emit in Bloc and Cubit
emit in Bloc and Cubit
Cubit, emit is protected so it can only be used within the Cubit instance.Bloc, emit is internal so it cannot be used outside of the internal package implementation.BREAKING: refactor: remove deprecated listen on BlocBase
listen on BlocBaseBREAKING: refactor: remove deprecated TransitionFunction
TransitionFunctiontransformEventsmapEventToStatetransformTransitionsStateError if an event is added without a registered event handlerfix: on should have an EventTransformer instead of EventTransformer
on<E extends Event> should have an EventTransformer<E> instead of EventTransformer<Event>DEPRECATE: fix: mapEventToState deprecated in favor of on
on<Event> API to register event handlers
Bloc.transformer API to configure the default EventTransformerEmitter<State> to trigger state changes
call to trigger a state change (alignment with Cubit)forEach as an analogue for await foronEach to simplify subscription managementisDone to abort expensive async operationsStateError if mapEventToState is used in conjunction with on<Event>StateError if duplicate event handlers are registeredAssertionError when emit is called in a completed EventHandlerAssertionError when emit.onEach and emit.forEach are unawaitedmapEventToState deprecated in favor of on<Event>transformEvents deprecated in favor of EventTransformer
EventTransformer or define your owntransformTransitions deprecated
Stream<State> get stream to modify the outbound streamBREAKING: refactor: require emit.forEach onData to be synchronous
emit.forEach onData to be synchronouson<Event> implementationBREAKING: refactor!: make onData callback in emit.onEach and emit.forEach named
onData callback in emit.onEach and emit.forEach namedemit.isCanceled to emit.isDone to encapsulate completion and cancelationonError in emit.onEach and emit.forEachAssertionError when emit is called in a completed EventHandlerAssertionError when emit.onEach and emit.forEach are unawaitedemit.onEach and emit.forEach error propagation when stream emits an errorDEPRECATE: fix: mapEventToState deprecated in favor of on
on<Event> API to register event handlers
Bloc.transformer API to configure the default EventTransformerEmitter<State> to trigger state changes
call to trigger a state change (alignment with Cubit)forEach as an analogue for await foronEach to simplify subscription managementisCanceled to abort expensive async operationsStateError if mapEventToState is used in conjunction with on<Event>StateError if duplicate event handlers are registeredmapEventToState deprecated in favor of on<Event>transformEvents deprecated in favor of EventTransformer
EventTransformer or define your owntransformTransitions deprecated
Stream<State> get stream to modify the outbound streamfeat: expose isClosed getter on BlocBase
isClosed getter on BlocBaseonChange description in READMErefactor: deprecate bloc.listen in favor of bloc.stream.listen
Bloc and Cubit extend BlocBase
void onError(Cubit cubit, Object error, StackTrace stackTrace) -> void onError(BlocBase bloc, Object error, StackTrace stackTrace)void onCreate(Cubit cubit) -> void onCreate(BlocBase bloc)void onClose(Cubit cubit) -> void onClose(BlocBase bloc)Bloc and Cubit do not extend Stream and implement Sink
bloc.stream or cubit.stream to access Stream<State>
myBloc.map(...) -> myBloc.stream.map(...)bloc.listen in favor of bloc.stream.listenCubitUnhandledErrorException -> BlocUnhandledErrorException>=2.12.0-0 <3.0.0transformEvents multiple subscriptions issuetransformEvents behaviormeta: ^1.3.0refactor: deprecate bloc.listen in favor of bloc.stream.listen
Bloc and Cubit extend BlocBase
void onError(Bloc bloc, Object error, StackTrace stackTrace) -> void onError(BlocBase bloc, Object error, StackTrace stackTrace)void onCreate(Bloc bloc) -> void onCreate(BlocBase bloc)void onClose(Bloc bloc) -> void onClose(BlocBase bloc)Bloc and Cubit do not extend Stream and implement Sink
bloc.stream or cubit.stream to access Stream<State>
myBloc.map(...) -> myBloc.stream.map(...)bloc.listen in favor of bloc.stream.listenChange and onChange removed in favor of Transition and onTransitionfix: transformEvents multiple subscriptions issue
transformEvents multiple subscriptions issuetransformEvents behavior- chore: bump to meta: ^1.3.0
meta: ^1.3.0BREAKING: refactor: Cubit extends Bloc
Cubit extends Bloc
Change and onChange removed in favor of Transition and onTransitionvoid onError(Cubit cubit, Object error, StackTrace stackTrace) -> void onError(Bloc bloc, Object error, StackTrace stackTrace)void onCreate(Cubit cubit) -> void onCreate(Bloc bloc)void onClose(Cubit cubit) -> void onClose(Bloc bloc)CubitUnhandledErrorException -> BlocUnhandledErrorExceptionfeat!: upgrade Dart SDK constraints to >=2.12.0-0 <3.0.0
>=2.12.0-0 <3.0.0fix: transformEvents multiple subscriptions issue due to v6.1.2
transformEvents multiple subscriptions issue due to v6.1.2fix: bloc memory leak due to internal event stream being a broadcast stream
fix: close should always emit done
close should always emit donefeat: add onCreate and onClose to BlocObserver
onCreate and onClose to BlocObserverdocs: README updates to include flow diagrams for Bloc and Cubit.
Bloc and Cubit.refactor: cubit internal memory and performance optimizations
docs: minor documentation fixes and improvements
BREAKING: do not emit current state on subscription
onError in BlocObserver takes a Cubit as first parametercubit and remove external dependency on package:cubit
CubitChange (Transition for Cubit)onChange added to BlocObserver@visibleForTesting to emit on class Cubitfix: add @visibleForTesting to emit on class Cubit
@visibleForTesting to emit on class CubitBREAKING: do not emit current state on subscription
onError in BlocObserver takes a Cubit as first parametercubit and remove external dependency on package:cubit
CubitChange (Transition for Cubit)onChange added to BlocObserverdocs: minor documentation updates
cubit ^0.1.2BREAKING: remove initialState override in favor of providing the initial state via super (#1304).
initialState override in favor of providing the initial state via super (#1304).BlocSupervisor and rename BlocDelegate to BlocObserver.null states (#1312).Stream.addError to conform to EventSink interface.onError, onTransition, onEvent as protected.feat: add addError to conform to EventSink interface.
addError to conform to EventSink interface.onError, onTransition, onEvent as protected.docs: additional minor improvement to bloc logo alignment
docs: minor improvement to bloc logo alignment
BREAKING: Remove BlocSupervisor and rename BlocDelegate to BlocObserver.
BlocSupervisor and rename BlocDelegate to BlocObserver.Ignore newly added events after bloc is closed (#1236).
Additional documentation optimizations.
Optimize documentation assets for smaller viewports.
Update documentation and static assets.
^0.0.13Update documentation and static assets.
BREAKING: update initialState to be a required positional parameter (related issue).
initialState to be a required positional parameter (related issue).BREAKING: remove initialState override in favor of providing the initial state via super (#1304).
Replace transformStates with transformTransitions
Surface Unhandled Bloc Errors in Debug Mode
Add mustCallSuper to onEvent, onTransition, and onError
mustCallSuper to onEvent, onTransition, and onErrorFix remove duplicate terminating state
Replace transformStates with transformTransitions
- Upgrade to rxdart ^0.23.0 - Upgrade to Dart >= 2.6.0
rxdart ^0.23.0Dart >= 2.6.0Your coding agent can read these notes before it upgrades. Set up the MCP server →