Flutter Redux 启动器/代码生成器

Flutter/Redux 的入门项目和代码生成器。

视频

我们正在使用这种方法来开发 Invoice NinjaFlutter 应用

用法

步骤 1:克隆 GitHub 仓库

git clone [email protected]:hillelcoren/flutter-redux-starter.git <application> && cd <application>

步骤 2:初始化项目

./starter.sh init <公司> <应用> <网址>

步骤 3:创建模块

./starter.sh make <应用> <模块> <字段>

例如

git clone [email protected]:hillelcoren/flutter-redux-starter.git hacker_news && cd hacker_news
./starter.sh init hacker_news articles api.hackerwebapp.com
./starter.sh make articles article title,url
# Change the route on line 20 of lib/data/repositories/article_repository.dart from /articles to /news
flutter run

注意:在 macOS 上,sed 会留下以 -e 结尾的备份文件,您可以使用此命令删除这些文件

find . -name "*-e" -type f -delete

特点

  • 支持大型 Redux 存储,通过单独持久化部分数据
  • 应用状态(包括导航)在表单更改时持久化
  • 自动实现排序和搜索支持
  • 账户电子邮件也备份在共享偏好设置中
  • 所有状态和模型类均使用 built_values 创建

包含的包

GitHub

https://github.com/hillelcoren/flutter-redux-starter