implementing-flutter-bloc

implementing-flutter-bloc is a skill for Claude Code, Codex from Poorgramer-Zack/dart-expert-skills. It costs 131 tokens per session (1,274 once invoked), scanned A, original, MIT.

Guidance for implementing BLoC state management in Flutter, where user or system events produce explicit state changes. BLoC is a pattern that keeps screen code separate from business rules.

In plain words
What is it for?
Building Cubit or Bloc classes, mapping events to states, updating screens with BlocBuilder or BlocListener, and controlling concurrent events such as searches or login flows.
Why use it?
It makes data flow easier to follow and supports testing for both simple and complex interactions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building Cubit or Bloc classes, mapping events to states, updating screens with BlocBuilder or BlocListener, and controlling concurrent events such as searches or login flows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/poorgramer-zack/dart-expert-skills/flutter-bloc
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Poorgramer-Zack/dart-expert-skills --skill flutter-bloc
Clone the repo
git clone --depth 1 https://github.com/Poorgramer-Zack/dart-expert-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for implementing-flutter-bloc

README.md
[![agentmods](https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/flutter-bloc/github.svg)](https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/flutter-bloc)
Your own site
<a href="https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/flutter-bloc"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/flutter-bloc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for implementing-flutter-bloc

Your own site · 80×15
<a href="https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/flutter-bloc"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/flutter-bloc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,274 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00131 $0.01274
Opus 5 $0.00066 $0.00637
Sonnet 5 $0.00026 $0.00255
Haiku 4.5 $0.00013 $0.00127

Measured 11d ago against content hash d343ce808c9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

implementing-flutter-bloc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/flutter-bloc/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BLoC State Management (v9.x)

Goal

Strict separation of UI from business logic via event-driven unidirectional data flow. Choose Cubit (lightweight, no events) for simple state, or full Bloc (events + transformers) for complex flows.

Process

1. Install Dependencies

dependencies:
  flutter_bloc: ^9.1.1
  equatable: ^2.0.5
  bloc_concurrency: ^0.3.0  # For event transformers

dev_dependencies:
  bloc_test: ^10.0.0

2. Choose Pattern

Pattern When to Use
Cubit Simple state (toggle, counter, form validation)
Bloc Event tracking, transformers, complex flows (login, search debounce)

3A. Implement Cubit

class CounterState extends Equatable {
  final int value;
  const CounterState({required this.value});
  @override
  List<Object?> get props => [value];
}

class CounterCubit extends Cubit<CounterState> {
  CounterCubit() : super(const CounterState(value: 0));
  void increment() => emit(CounterState(value: state.value + 1));
  void decrement() => emit(CounterState(value: state.value - 1));
}

3B. Implement Bloc

abstract class CounterEvent extends Equatable {
  const CounterEvent();
  @override
  List<Object?> get props => [];
}
class CounterIncremented extends CounterEvent {}
class CounterDecremented extends CounterEvent {}

class CounterBloc extends Bloc<CounterEvent, CounterState> {
  CounterBloc() : super(const CounterState(value: 0)) {
    on<CounterIncremented>((e, emit) => emit(CounterState(value: state.value + 1)));
    on<CounterDecremented>((e, emit) => emit(CounterState(value: state.value - 1)));
  }
}

4. Provide to Widget Tree

MultiBlocProvider(
  providers: [
    BlocProvider(create: (context) => CounterCubit()),
    BlocProvider(create: (context) => AuthBloc()),
  ],
  child: MyApp(),
)

5. Consume State

Widget Use For
BlocBuilder Rebuild UI on state changes
BlocListener Side effects only (navigation, snackbars)
BlocConsumer Rebuild + side effects together

Read the full file on GitHub · 148 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 148 lines · 131 tokens per session scan A d343ce808c9a

Subscribe to this mod's changes

implementing-flutter-bloc is a skill published in the GitHub repository Poorgramer-Zack/dart-expert-skills (7 stars, last pushed 1mo ago), licensed MIT. It adds 131 tokens to every session and 1,274 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.