skills/flutter/flutter-bloc-state-management/SKILL.md
Implement BLoC/Cubit state management correctly in Flutter. Use when writing, modifying, reviewing, or testing any BLoC, Cubit, state, or event file.
npx skillsauth add hoangnguyen0403/agent-skills-standard flutter-bloc-state-managementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.development
Summarizes GitHub PR, GitLab MR, or Azure DevOps PR metadata, review threads, changed files, and template completeness. Use during review-ticket or code-review workflows when PR/MR context exists.
tools
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling.
development
Validate input, secure auth tokens, and prevent injection attacks in TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration.
development
Apply modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings.