`emit()` is not a `Future`, and BLoC state must be emitted inside an `on<Event>` handler. ```dart sealed class CounterEvent {} final class CounterIncremented extends CounterEvent {} class CounterBloc extends Bloc<CounterEvent, int> { CounterBloc() : super(0) { on<CounterIncremented>((event, emit) { emit(state + 1); print('done'); }); } void increment() => add(CounterIncremented()); } ``` Remove `.then()`. If the handler performs asynchronous work, use `async`/`await` before calling `emit()`.
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill flutter-bloc-state-management --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Flutter Bloc State Management?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-flutter-bloc-state-management-8eef6447)More formats (shields.io, HTML) on the badges page.
`emit()` is not a `Future`, and BLoC state must be emitted inside an `on<Event>` handler.
```dart
sealed class CounterEvent {}
final class CounterIncremented extends CounterEvent {}
class CounterBloc extends Bloc<CounterEvent, int> {
CounterBloc() : super(0) {
on<CounterIncremented>((event, emit) {
emit(state + 1);
print('done');
});
}
void increment() => add(CounterIncremented());
}
```
Remove `.then()`. If the handler performs asynchronous work, use `async`/`await` before calling `emit()`.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.