bloc_enhancer
An annotation package simplifying Bloc event and state classes, enhancing code readability and reducing naming conflicts.
0.9.2
12K downloads/mo
#2754 most downloaded on pub.dev
Couchsurfing/dart-bloc-enhancer
What this package is like to depend on
Last release 2 months ago
06 Jun 2026
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 14 of 16 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
16 releases · first in 2024
6 releases in the last 12 months
see the full history below
Release timeline
16 releases · Mar 2024 to Jun 2026Releases
latest 16-
0.9.206 Jun 2026Release notes
Open source →Fixes
- Resolve super formal parameter types when the super constructor uses private field formals (e.g.
super.allforwarding tothis._all) - Strip leading underscores from private field-formal names in generated
createfactory methods and constructor calls (e.g.this._offset→offset:)
- Resolve super formal parameter types when the super constructor uses private field formals (e.g.
-
0.9.124 Mar 2026Release notes
Open source →Features
- Support event/state classes with generic type parameters (e.g.
class _AddTokenFailed<E extends Object>)- Type parameters are propagated to generated methods and constructor calls for full type safety at the call site
- Thank you for your contribution @SupposedlySam!
- Support event/state classes with generic type parameters (e.g.
-
0.9.006 Mar 2026 -
0.8.002 Mar 2026Release notes
Open source →Features
- Generate
isX/asX/asIfXfor sealed intermediate state classes (#2) - Bump minimum Dart version to 3.0.0
- Generate
-
0.7.002 Feb 2026 -
0.6.019 Sep 2025 -
0.5.106 May 2025Release notes
Open source →Enhancements
- Ignore abstract classes when generating event & state methods
-
0.5.022 Feb 2025 -
0.4.021 Feb 2025 -
0.3.220 Nov 2024Nothing published for this version
-
0.3.2+120 Nov 2024Release notes
Open source →Features
- Create "as if" getters for state retrieval
if (state.asIfReady case final readyState?) { // Handle the ready state } -
0.3.104 Oct 2024 -
0.3.027 Sep 2024Release notes
Open source →Features
- Support creating event factories
- Annotate the base event class with
@createFactory
- Annotate the base event class with
Enhancements
- Check for used names while creating event & state methods
- If a name conflicts, the method's name will be suffixed with a number
- This applies to create factories and event methods
Breaking Changes
- Deprecate
@createStateFactoryin favor of@createFactory- This will be removed in a future release
- Support creating event factories
-
0.2.0+120 Aug 2024 -
0.1.025 Mar 2024Nothing published for this version
-
0.1.0+125 Mar 2024