What problem does it solve?
This Skill provides comprehensive guidance and rules for implementing the BLoC (Business Logic Component) and Cubit patterns in Flutter applications, ensuring predictable state management, clean architecture, and robust testing.
Core Features & Use Cases
- State Management Best Practices: Covers naming conventions for events and states, effective state modeling (Equatable, immutable, sealed classes), and the distinction between Cubit and Bloc.
- Widget Integration: Explains how to use widgets like
BlocBuilder, BlocListener, and BlocProvider for UI updates and dependency injection.
- Architecture & Testing: Details how to structure your application by injecting dependencies into blocs and provides examples for unit testing state transitions using
bloc_test.
- Use Case: Ensure all your Flutter state management follows the official BLoC/Cubit guidelines, from initial setup to advanced testing and ecosystem integration.
Quick Start
Use the flutter-bloc skill to generate a new Cubit for managing user authentication state.