fx-event-emitter

Publish typed events across Flutter modules via a global FxEmitter singleton.

12|2|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/toly1994328/flash_im_by_ai --skill fx-event-emitter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fx-event-emitter
Source: https://github.com/toly1994328/flash_im_by_ai/tree/main/.kiro/skills/fx-event-emitter
Command: npx skills add https://github.com/toly1994328/flash_im_by_ai --skill fx-event-emitter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Global event bus enables cross-module communication without tight coupling and without passing callbacks through layers, simplifying coordination between UI, navigation, and business logic.

Core Features & Use Cases

  • FxEmitter singleton for publishing events across modules without direct dependencies.
  • Strongly-typed FxEvent classes to carry payload data between components.
  • App-shell level listeners with proper lifecycle management to prevent leaks.
  • Optional FxEmitterMixin to streamline subscription setup in widgets.
  • AsyncFxEvent support for request/response style workflows across the app.

Quick Start

Emit a cross-module event from any module and listen for the corresponding handler in the app shell to trigger UI updates.

Frequently Asked Questions about fx-event-emitter

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

FAQPage Schema
How do I handle cross-module communication in a Flutter app without passing callbacks?

Cross-module communication in a Flutter app is handled using a global event bus that decouples modules and avoids callback chains. A singleton emitter publishes strongly-typed events across features, allowing UI actions and navigation triggers to coordinate without direct dependencies.

What is a typed event bus in Dart and how does it modularize architecture?

A typed event bus in Dart is a centralized mechanism that enforces a shared event model to carry payload data between components. It modularizes architecture by allowing separate features to emit and listen for strongly-typed events without knowing each other's internal implementation details.

How do I prevent memory leaks when subscribing to global events in Flutter widgets?

To prevent memory leaks when subscribing to global events in Flutter widgets, use app-shell level listeners with proper lifecycle management. An optional mixin can streamline subscription setup in widgets, ensuring that listeners are safely disposed of during the widget lifecycle.

Does this global event bus support request/response style workflows in Dart?

Yes, the global event bus supports request/response style workflows in Dart through optional AsyncFxEvent patterns. This allows modules to handle asynchronous operations and emit responses across the app while maintaining the decoupled modular architecture.

What is the best way to trigger UI updates from a separate feature module in Flutter?

The best way to trigger UI updates from a separate feature module in Flutter is emitting a cross-module event from the source module. The app shell listens for the corresponding handler and triggers the necessary UI updates, maintaining complete feature decoupling.