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

插件详情v7.1.0

signals_flutter

信号库公开了四个核心函数,这些函数是构建您所能想到的任何业务逻辑的基础。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
3.7万
喜欢数
93
Pub 分数
150

安装插件

flutter pub add signals_flutter

插件介绍

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

Signals Flutter 是一种轻量级的状态管理解决方案,提供四个核心功能来建模复杂的业务逻辑。它通过允许开发者高效地创建、观察和响应数据流中的变化,实现响应式编程。基于 Dart 的响应式原则构建,它促进了代码的简洁性、可组合性和可测试性。该库设计简单且性能优越,非常适合需要在多个平台上对状态更新进行细粒度控制的应用程序。

适合场景

  • 实时数据同步
  • 复杂表单状态管理
  • 跨组件状态共享
  • 事件驱动的UI更新
  • 基于状态的动态UI渲染
  • 响应式业务逻辑建模

主要特点

  • 四个核心响应式函数
  • 轻量且最小化 API
  • 高度可组合
  • Platform-agnostic
  • 内置依赖注入支持
  • 高效的变更传播

适合对象

  • 寻求最小状态管理开销的开发者
  • 需要精细状态控制的项目
  • 使用响应式编程模式的团队
  • 面向多平台的应用程序
  • 使用响应式逻辑进行原型设计或构建可扩展的应用程序

使用建议

  • 需要理解响应式编程概念
  • 有限的内置调试工具
  • 不建议用于非常简单的状态需求
  • 新手学习信号范式的学习曲线
  • 大型状态结构可能需要额外的样板代码

原始 README

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

Tests Website GitHub stars Coverage GitHub issues GitHub pull-requests melos

Signals.dart

Try chat with CodeWiki!

Features

  • 🪡 Fine grained reactivity: Based on Preact Signals and provides a fine grained reactivity system that will automatically track dependencies and free them when no longer needed
  • ⛓️ Lazy evaluation: Signals are lazy and will only compute values when read. If a signal is not read, it will not be computed
  • 🗜️ Flexible API: Every app is different and signals can be composed in multiple ways. There are a few rules to follow but the API surface is small
  • 🔬 Surgical Rendering: Widgets can be rebuilt surgically, only marking dirty the parts of the Widget tree that need to be updated and if mounted
  • 💙 100% Dart Native: Supports Dart JS (HTML), Shelf Server, CLI (and Native), VM, Flutter (Web, Mobile and Desktop). Signals can be used in any Dart project

To start using signals, check out the full documentation.

VS Code Extension: https://marketplace.visualstudio.com/items?itemName=rodydavis.signals-dart

Packages

Package Pub
signals signals
signals_core signals_core
signals_flutter signals_flutter
signals_lint signals_lint
signals_hooks signals_hooks
preact_signals signals_lint
signals_devtools_extension

AI Developer Skills

To enable AI coding assistants (like Google Antigravity, Gemini, Claude, Cursor, GitHub Copilot, and others) to build high-quality reactive systems with signals.dart, this repository includes prepackaged, high-fidelity developer Skills.

These skills are located under the ./skills directory and are fully modular:

  • signals-preact-dart: Deep knowledge and best practices for core reactive primitives (signal, computed, effect, batch, untracked).
  • signals-dart: Best practices for async signal operations (FutureSignal, StreamSignal), reactive collections, writable computed signals (linkedSignal), and value semantics.
  • signals-flutter: Comprehensive guides on element-level reactive UI integration, high-frequency GPU rendering bypasses, lifecycle side-effects, and .watch(context) extensions.
  • signals-migration-6-to-7: Detailed instructions, patterns, and refactoring techniques to safely upgrade applications from signals v6.x to v7.0.0.
How to use them:
1. One-Command Installation via skills.sh

You can instantly install all available signals skills into your global AI environment using the unified skills.sh registry CLI:

npx skills add rodydavis/signals.dart
2. Manual Reference

Simply reference the path to the desired skill directory in your AI prompt, or load the contents of the relevant SKILL.md files as context for your AI coding assistant.

Contributors

所属分类

依赖

依赖清单 1 项

  • signals_core^7.0.0

源码仓库

使用此插件的项目