搜索插件、代码仓与 APP 分类

插件详情v1.0.1

listen

一个用于在纯 Dart 中通知状态更改给感兴趣监听器的包。

AndroidiOSLinuxmacOSWebWindows
近 30 天下载
242万
喜欢数
44
Pub 分数
160

安装插件

flutter pub add listen

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

listen 包提供了一种轻量级的纯 Dart 解决方案,用于向已注册的监听器通知状态变化。它能够在不依赖 Flutter 特定组件或框架的情况下,实现组件间的高效通信。该包设计简洁且性能优异,支持细粒度更新,非常适合在需要最小开销的状态管理场景中使用。该包可在 Flutter 支持的所有主要平台上运行,适用于多平台应用中的共享逻辑。

适合场景

  • 实时数据更新
  • 跨组件通信
  • 库中的状态管理
  • 事件驱动架构
  • 解耦的 UI 和业务逻辑

主要特点

  • 纯 Dart 实现
  • 最小性能开销
  • 细粒度变更通知
  • 支持多个监听器
  • 平台无关设计

适合对象

  • 需要状态通知的库作者
  • 开发者避免框架依赖
  • 多平台共享代码库
  • 简单的状态管理需求

使用建议

  • 不是完整状态管理解决方案
  • 需要手动管理监听器
  • 有限的内置调试工具
  • 最适合用于非UI状态跟踪

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Flutter Core Packages

Release Status Flutter CI Status

This repo is a companion to the flutter/flutter and flutter/packages repositiories. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team) that cannot depend on Flutter, generally because they are used by the flutter/flutter repository. Check the packages directory to see all packages.

These packages are also available on pub.

Issues

Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled "package".

Contributing

If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.

If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.

Packages

These are the packages hosted in this repository:

Package Pub Points Usage Issues Pull requests
flutter_hook_config pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_template_images pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
listen pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
multicast_dns pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
mustache_template pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
standard_message_codec pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_math pub package pub points downloads GitHub issues by-label GitHub pull requests by-label

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。

所在榜单