What problem does it solve?
This Skill eliminates the common pitfalls of messy, hard-to-test Flutter state management when using BLoC or Cubit, avoiding issues like boolean soup states, scattered side effects, and unnecessary UI widget rebuilds.
Core Features & Use Cases
- Pattern Selection Guidance: Clear decision rules to choose between local UI state, Cubit for simple feature logic, and BLoC for complex event-driven flows.
- Implementation Best Practices: Enforces immutable states, user-intent focused events, proper side effect isolation, and narrow widget rebuilds via BlocSelector or buildWhen.
- Testing Scaffolding: Structured output for state models, event flows, and bloc_test coverage for success, failure, loading, and concurrency scenarios.
- Use Case: When building a new multi-step checkout flow in a Flutter e-commerce app, use this Skill to select the appropriate BLoC pattern, define the state and event models, and generate test cases for all flow edge cases.
Quick Start
Use the flutter-bloc skill to design the state management structure for your Flutter app's new user profile editing feature, including the appropriate Cubit or BLoC implementation and corresponding test cases.