add-effect
CommunityAdd one-time UI effects to state changes.
Authormarcglasberg
Version1.0.0
Installs0
System Documentation
What problem does it solve?
State management for Flutter/Cubit often needs one-time side effects (snackbars, dialogs, navigation) that should trigger only once. This skill provides typed and untyped Effect fields in state to model and emit such one-time actions, ensuring consumption after read.
Core Features & Use Cases
- Adds Effect<T> or untyped Effect fields to state for one-time notifications like snackbars, dialogs, navigation.
- Provides patterns for emitting effects from Cubit and consuming them in widgets via context.effect(), using addPostFrameCallback for dialogs/navigation.
- Includes examples for common effects: showSnackbar, navigate, clearText, setText, etc.
Quick Start
Define an Effect field in your state class, initialize it as spent, emit a new Effect value when you want to trigger a one-time UI action, and consume it in the widget with context.effect().
Dependency Matrix
Required Modules
None requiredComponents
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: add-effect Download link: https://github.com/marcglasberg/bloc_superpowers/archive/main.zip#add-effect Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.