asyncredux-events

Emit and consume one-off UI events in AsyncRedux Flutter apps.

238|39|Updated Aug 4, 2019
One-click install
npx skills add https://github.com/marcglasberg/async_redux --skill asyncredux-events
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asyncredux-events
Source: https://github.com/marcglasberg/async_redux/tree/main/.claude/skills/asyncredux-events
Command: npx skills add https://github.com/marcglasberg/async_redux --skill asyncredux-events

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers to manage one-off, UI-driven events within AsyncRedux, allowing widgets to react to transient triggers without persisting state.

Core Features & Use Cases

  • Create and declare Evt-based events in AppState (spent or unspent) to signal UI actions.
  • Dispatch events from actions and consume them in widgets with context.event(), enabling behaviors like clearing text fields, scrolling lists, or navigating once.
  • Coordinate one-time side effects across TextField, ListView, dialogs, and other widgets using a single source of truth.

Quick Start

Initialize events in the state as spent (Evt.spent()), dispatch new events with Evt() or Evt<T>(value) from actions, and read them in widgets using context.event((s) => s.someEvt) to trigger UI changes on read. Ensure you consume events exactly once per trigger.

Frequently Asked Questions about asyncredux-events

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

FAQPage Schema
How do I trigger one-time UI events in Flutter without persisting state?

To trigger one-time UI events in Flutter without persisting state, use AsyncRedux to dispatch an Evt class from actions and consume it in widgets via context.event, ensuring the event is read exactly once.

What is the best way to clear a text field or scroll a list once using AsyncRedux?

The best way to clear a text field or scroll a list once using AsyncRedux is to dispatch an Evt event from an action and consume it in the widget with context.event, which triggers the UI behavior exactly once.

How do I initialize one-time events in AppState to prevent replaying them?

To prevent replaying one-time events, initialize them in AppState as spent using Evt.spent(), dispatch new events with Evt() or Evt<T>(value), and consume them once with context.event to ensure they are not replayed.

Does AsyncRedux support transient widget interactions for dialogs and navigation?

Yes, AsyncRedux supports transient widget interactions for dialogs and navigation by emitting one-off UI events through the Evt class, allowing widgets to react to transient triggers without persisting state.

Why do my Flutter one-time events keep firing repeatedly in the widget?

Flutter one-time events keep firing repeatedly if they are not consumed exactly once per trigger, so ensure your AppState initializes events as spent using Evt.spent() and reads them via context.event.

Can I pass a value when dispatching a one-time event to a Flutter widget?

Yes, you can pass a value when dispatching a one-time event to a Flutter widget by using Evt<T>(value) from your actions, which the widget then consumes through context.event to trigger the UI change.