add-effect-queue

Add EffectQueue to state and emit ordered UI effects from a Cubit.

7|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/marcglasberg/bloc_superpowers --skill add-effect-queue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-effect-queue
Source: https://github.com/marcglasberg/bloc_superpowers/tree/main/.claude/skills/add-effect-queue
Command: npx skills add https://github.com/marcglasberg/bloc_superpowers --skill add-effect-queue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinating multiple one-time UI effects across a single user action is hard with plain event patterns. This skill introduces an EffectQueue to state, enabling ordered sequencing of UI actions such as show a toast, then a dialog, then navigation, in a single Cubit action.

Core Features & Use Cases

  • Adds EffectQueue<UiEffect> to the app state for deterministic sequencing of effects.
  • Emits remaining effects to continue the chain; supports one-per-frame or all-at-once execution.
  • Enables common patterns like onboarding flows, form submissions, and error handling with recovery steps.

Quick Start

Define an EffectQueue in your AppState, emit a sequence of effects from your Cubit, and consume them in the widget to run each effect in order.

Frequently Asked Questions about add-effect-queue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sequence multiple UI effects in Flutter like showing a toast then a dialog?

Sequencing UI effects in Flutter involves defining an EffectQueue-typed field in your AppState and emitting effects from a Cubit. This allows you to chain actions like showing a toast, then a dialog, then navigation in a deterministic order.

What is the best way to manage ordered side effects with Cubit state management?

The best way to manage ordered side effects with Cubit is adding an EffectQueue to your state. It handles the sequencing of UI actions by emitting remaining effects to continue the chain, supporting both one-per-frame and all-at-once execution modes.

Can I execute all queued Flutter UI effects at once instead of one per frame?

Yes, you can execute all queued Flutter UI effects at once. The EffectQueue supports configurable execution modes, allowing widgets to consume effects either sequentially with one-per-frame timing or all-at-once for immediate processing.

How does EffectQueue handle state for onboarding flows and form submissions?

EffectQueue handles state for onboarding flows and form submissions by emitting a sequence of effects from a Cubit. It validates and resets forms or walks through onboarding steps by ensuring each UI effect runs in a strict, ordered sequence.

Why do my multiple one-time UI effects fire out of order in Flutter?

Multiple one-time UI effects fire out of order in Flutter because plain event patterns struggle to coordinate them. By introducing an EffectQueue into your state, you enforce deterministic sequencing to ensure actions execute in the correct chain.