Skip to content

Bloc

stackchain:
state_management: bloc

Generated structure (feature_first / clean)

Section titled “Generated structure (feature_first / clean)”
presentation/bloc/
<feature>_event.dart
<feature>_state.dart
<feature>_bloc.dart
  • Explicit events and states — excellent for complex flows
  • First-class testing with bloc_test
  • Default production preset: production_bloc
  • Adds flutter_bloc / bloc to pubspec
  • Generates event/state/bloc trio per feature
  • Pages consume the bloc via Flutter Bloc patterns in templates
  • DI registers feature dependencies in managed regions