bloc_enhancer_gen 0.9.1
bloc_enhancer_gen: ^0.9.1 copied to clipboard
A code generator for simplifying Bloc event and state classes, enhancing code readability and reducing naming conflicts.
0.9.1 | 3.18.2026 #
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!
0.8.0 | 3.2.2026 #
0.3.2+1 | 11.20.2024 #
Features #
- Create "as if" getters for state retrieval
if (state.asIfReady case final readyState?) {
// Handle the ready state
}
0.3.0 | 9.27.2024 #
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
0.1.0+1 | 3.25.2024 #
Initial Release