Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implement BLoC/Cubit state, events, transitions, and async concurrency in Flutter. Use for BLoC/Cubit feature logic, debounced/cancellable events, state rendering, or bloc tests—not generic widget-only work.
.claude/skills/hoangnguyen0403-flutter-bloc-state-management/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -19% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-17 | ✓→✗ | ▼ Worse | -5% | 0% |
| case-20 | ✓→✗ | ▼ Worse | 41% | 0% |
Role: Flutter State Management Expert. Design predictable, testable state flows.
@freezed.on<Event>.BlocBuilder for rebuilds, BlocListener for side effects.Initial, Loading, Success, Failure states).Failure states for UI-critical errors. For silent/background events, either let exceptions propagate naturally to global onError interceptor (e.g., in AppBlocObserver), or catch and call addError(e, st) without emitting error state.emit call.bloc_concurrency for search/typeahead to debounce and cancel previous requests.blocTest used for ALL states?BlocBuilder?BlocListener (NOT Builder)?await or emit.forEach() to emit.StreamSubscription or BlocListener, not direct refs.buildWhen predicate to prevent unnecessary rebuilds.blocTest covering Initial → Loading → Success and Initial → Loading → Failure.BlocListener, not BlocBuilder.BlocBuilder widgets declare buildWhen.flutter test passes.emit() is not a Future: Remove .then() from it, use await for asynchronous work, and register the event with an on<Event> handler.When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-17 | pass→fail | 21,057 | 15,631 | -26% | 1 | 1 | 0% | 2,505 | 2,377 | -5% | 0 | 0 | — |
case-01 | fail→pass | 37,337 | 26,572 | -29% | 1 | 1 | 0% | 6,153 | 4,960 | -19% | 0 | 0 | — |
case-02 | fail→fail | 26,369 | 25,831 | -2% | 1 | 1 | 0% | 3,647 | 4,665 | +28% | 0 | 0 | — |
case-03 | fail→pass | 34,498 | 26,841 | -22% | 1 | 1 | 0% | 5,520 | 4,910 | -11% | 0 | 0 | — |
case-04 | pass→pass | 17,334 | 16,764 | -3% | 1 | 1 | 0% | 2,750 | 2,607 | -5% | 0 | 0 | — |
case-05 | fail→pass | 23,096 | 16,558 | -28% | 1 | 1 | 0% | 2,687 | 2,581 | -4% | 0 | 0 | — |
case-06 | pass→pass | 12,259 | 12,182 | -1% | 1 | 1 | 0% | 1,876 | 1,672 | -11% | 0 | 0 | — |
case-07 | pass→pass | 17,669 | 17,681 | +0% | 1 | 1 | 0% | 2,140 | 2,988 | +40% | 0 | 0 | — |
case-08 | pass→pass | 16,750 | 12,297 | -27% | 1 | 1 | 0% | 2,061 | 3,039 | +47% | 0 | 0 | — |
case-09 | pass→pass | 10,418 | 13,462 | +29% | 1 | 1 | 0% | 1,767 | 2,185 | +24% | 0 | 0 | — |
case-10 | pass→pass | 12,696 | 11,635 | -8% | 1 | 1 | 0% | 2,175 | 2,774 | +28% | 0 | 0 | — |
case-11 | pass→pass | 19,665 | 15,157 | -23% | 1 | 1 | 0% | 2,166 | 2,295 | +6% | 0 | 0 | — |
case-12 | pass→pass | 16,223 | 9,548 | -41% | 1 | 1 | 0% | 1,920 | 1,300 | -32% | 0 | 0 | — |
case-13 | pass→pass | 15,406 | 10,360 | -33% | 1 | 1 | 0% | 1,498 | 1,462 | -2% | 0 | 0 | — |
case-14 | pass→pass | 18,369 | 6,606 | -64% | 1 | 1 | 0% | 1,947 | 1,617 | -17% | 0 | 0 | — |
case-15 | pass→pass | 14,689 | 10,956 | -25% | 1 | 1 | 0% | 1,614 | 1,483 | -8% | 0 | 0 | — |
case-16 | pass→pass | 18,702 | 10,385 | -44% | 1 | 1 | 0% | 2,308 | 2,504 | +8% | 0 | 0 | — |
case-18 | pass→pass | 20,497 | 20,254 | -1% | 1 | 1 | 0% | 2,391 | 3,177 | +33% | 0 | 0 | — |
case-19 | pass→pass | 12,899 | 6,244 | -52% | 1 | 1 | 0% | 1,271 | 1,613 | +27% | 0 | 0 | — |
case-20 | pass→fail | 18,502 | 21,753 | +18% | 1 | 1 | 0% | 2,745 | 3,872 | +41% | 0 | 0 | — |
case-21 | pass→pass | 12,166 | 14,966 | +23% | 1 | 1 | 0% | 2,031 | 2,529 | +25% | 0 | 0 | — |
case-22 | pass→pass | 13,245 | 11,688 | -12% | 1 | 1 | 0% | 2,308 | 2,861 | +24% | 0 | 0 | — |
case-23 | pass→pass | 15,573 | 14,678 | -6% | 1 | 1 | 0% | 1,722 | 2,358 | +37% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of 0 percentage points is the difference between those two pass rates over the 23 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.