consume-effect
CommunityConsume one-time state effects in UI widgets.
Authormarcglasberg
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Consumes one-time effects emitted by state (Effect<T>) within UI widgets by using context.effect(), allowing the UI to react once per event and prevent re-triggering.
Core Features & Use Cases
- Read and consume Effect<T> fields from state in widgets
- Automatically mark effects as spent after consumption
- Trigger side effects (snackbars, navigation, dialogs) when new effects arrive
- Safely handle multiple effects across different Cubits
Quick Start
Use context.effect() in the widget build to read and react to the first new effect, then respond in the UI accordingly.
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: consume-effect Download link: https://github.com/marcglasberg/bloc_superpowers/archive/main.zip#consume-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 223,000+ vetted skills library on demand.