event-listener-container

Community

Auto-manage Flutter event subscriptions.

Authorhunmer
Version1.0.0
Installs0

System Documentation

What problem does it solve?

为Flutter插件视图自动管理事件订阅,避免手动订阅带来的内存泄漏和重复模板代码。

Core Features & Use Cases

  • 自动管理事件订阅生命周期:在需要响应全局事件的 UI 区域自动订阅和取消订阅。
  • 将 UI 包裹在 EventListenerContainer 中,简化事件驱动的界面更新。
  • 与 AnimatedBuilder 等控制器组合使用,支持多监听器并减少样板代码。

Quick Start

Import the widget and wrap your UI with EventListenerContainer.

  • Import: package:Memento/widgets/event_listener_container.dart
  • Wrap: EventListenerContainer( events: ['data_changed', 'theme_changed'], onEvent: () => setState(() {}), child: MyContentWidget(), )

Dependency Matrix

Required Modules

None required

Components

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: event-listener-container
Download link: https://github.com/hunmer/Memento/archive/main.zip#event-listener-container

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.