replace-bloc-listener

Community

Replace BlocListener with explicit Effects.

Authormarcglasberg
Version1.0.0
Installs0

System Documentation

What problem does it solve?

BlocListener is a convenient but implicit mechanism to react to state changes, which can lead to scattered logic and missed side effects. This Skill replaces BlocListener usage with an explicit, effect-based approach that ties side effects directly to state via an Effect field and context.effect().

Core Features & Use Cases

  • Replace implicit BlocListener patterns with explicit Effects stored in state and emitted by Cubits.
  • Centralize side effects such as navigation, dialogs, or snackbars in a predictable, testable way.
  • Easily migrate multiple BlocListeners by adding Effect fields, updating copyWith, and emitting effects in Cubits.

Quick Start

Identify BlocListener usages in your UI and migrate them by adding an Effect field to the state, emitting effects from the Cubit, and replacing BlocListener with context.effect() in the widget tree.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: replace-bloc-listener
Download link: https://github.com/marcglasberg/bloc_superpowers/archive/main.zip#replace-bloc-listener

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.