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

flutter_redux_dev_tools 封面
插件详情v0.5.2

flutter_redux_dev_tools

适用于 Flutter 的时间旅行 Redux 调试工具

近 30 天下载
2150
喜欢数
14
Pub 分数
60

安装插件

flutter pub add flutter_redux_dev_tools

插件介绍

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

一个用于 Flutter 的时间旅行 Redux 调试工具,可让开发者在应用开发过程中检查和重放状态变化。它与 Redux 无缝集成,提供可视化界面以跟踪操作、查看状态转换,并通过前后逐步调试应用历史记录中的问题。适用于复杂的状态管理流程,可提高调试效率并促进对状态演进的更好理解。该工具支持亮色和暗色模式,与 Flutter 的主题功能保持一致。

适合场景

  • 调试复杂的状态转换
  • 重现用户操作以复现问题
  • 可视化随时间的状态变化
  • 测试 Redux 中间件行为
  • 改进团队在状态逻辑上的协作

主要特点

  • 时间旅行调试
  • 实时状态检查
  • 动作回放功能
  • 深色和浅色模式支持
  • 无缝 Redux 集成

适合对象

  • 使用 Redux 的 Flutter 开发人员
  • 正在开发状态密集型应用程序的团队
  • 专注于调试状态问题的前端工程师
  • 具有复杂业务逻辑的 Flutter 应用
  • 任何寻求增强调试工具的人

使用建议

  • 需要 Redux 设置
  • 不适合用于生产构建
  • 仅限开发环境
  • 可能会增加应用启动时间
  • 最好与结构良好的状态模型一起使用

原始 README

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

flutter_redux_dev_tools

Build Status codecov

A Widget you can use to show a Redux Time Travel UI. Simply put it in a part of your UI that makes sense (Such as a Dev Tools Drawer), pass it a DevToolsStore and you'll be good to go!

Note: This Widget does not work with a normal Redux Store. It is meant to work with the redux_dev_tools package, which provides a DevToolsStore. The DevToolsStore is a drop-in replacement for your Store during Development!

Demo

A simple Flutter app that allows you to Increment and Decrement a counter.

A screenshot of the Dev Tools in Action

Usage
  1. Create a main_dev.dart file
  2. In this file, create a DevToolsStore in place of a normal redux Store
  3. Create a ReduxDevTools widget, passing through the Store. You can place this Widget wherever makes sense in your app! One good suggestion: In a "Dev Tools Drawer." This is generally the endDrawer in your Scaffold, and can contain different types of tools for a Dev Build of your app.
Example

This example paints only a broad outline of how to use the ReduxDevTools. For a complete example, see the example folder.

int addReducer(int state, action) => state + 1;

// Create a DevToolsStore instead of a normal Store during Development
final store = DevToolsStore<int>(
  addReducer,
  initialState: 0,
);

// Finally, create your app with a Redux Dev Tools
main() { 
  runApp(MaterialApp(
    home: Scaffold(
      endDrawer: ReduxDevTools<int>(store),
    ),
  ));
}

Credits

All of this is inspired by the original Redux Devtools.

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目