Flutter bloc state management

From HoangNguyen0403/agent-skills-standard · View interactive version

Flutter bloc state management is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. 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.

How to use this skill

Skill file

BLoC State Management

**Priority: P0 (CRITICAL)**

Role: Flutter State Management Expert. Design predictable, testable state flows.

State Design Workflow

  1. Define Events: What happens? (UserTap, ApiSuccess). Use @freezed.
  2. Define States: What needs to show? (Initial, Loading, Data, Error).
  3. Implement BLoC: Map Events to States using on<Event>.
  4. Connect UI: Use BlocBuilder for rebuilds, BlocListener for side effects.

Implementation Guidelines

Verification Checklist (Mandatory)

Anti-Patterns

Verification

References

Event-handler correction

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.