Flutter开源项目 - 加密币客户端 flutter-crypto-app

微信 flutter 研修群 ducafecat

猫哥说

节日好伙伴们,今天这个项目推荐给大家,主要是用了 Riverpod 状态管理,Freezed 代码生成器, Flutter 2.2 空安全

还有就是 写了 单元测试 集成测试 Github Action,大家可以学习下。

image

代码

https://github.com/salvadordeveloper/flutter-crypto-app

参考

正文

特性功能

  • API REST (CryptoWatch) restful 拉取数据
  • Linear Graph View (Hour, Day, Week, etc) 图
  • OHLC Graph 图
  • Search 搜索
  • Light / Dark Theme 样式主题
  • Multi Lenguage 多语言
  • Exchange Selection 交易
  • Favorite Pair 收藏

技术栈

  • Flutter 2.2.0
  • Riverpod + Hooks 状态管理
  • Freezed 代码生成器
  • Dio http 通讯

测试

  • Unit Testing (flutter_test)
  • Integration Testing (integration_test)
  • Mock Data (http_mock_adapter)
  • Github Actions (iOS & Android Integration Test)

屏幕截图

image
image
image
image
image
image

项目安装

下载代码

git clone https://github.com/salvadordeveloper/flutter-crypto-app

安装包

flutter pub get

去申请 https://cryptowat.ch/zh-cn/ 账号 api

替换 API_KEY

API_KEY={CryptoWatch_KEY}

生成代码

flutter pub run build_runner build --delete-conflicting-outputs

运行 app

flutter run

单元测试

flutter test

集成测试

flutter drive --driver=test_driver/integration_test.dart --target=integration_test/main_test.dart

© 猫哥

https://ducafecat.tech/

https://github.com/ducafecat

往期

开源

GetX Quick Start

https://github.com/ducafecat/getx_quick_start

新闻客户端

https://github.com/ducafecat/flutter_learn_news

strapi 手册译文

https://getstrapi.cn

微信讨论群 ducafecat

系列集合

译文

https://ducafecat.tech/categories/%E8%AF%91%E6%96%87/

开源项目

https://ducafecat.tech/categories/%E5%BC%80%E6%BA%90/

Dart 编程语言基础

https://space.bilibili.com/404904528/channel/detail?cid=111585

Flutter 零基础入门

https://space.bilibili.com/404904528/channel/detail?cid=123470

Flutter 实战从零开始 新闻客户端

https://space.bilibili.com/404904528/channel/detail?cid=106755

Flutter 组件开发

https://space.bilibili.com/404904528/channel/detail?cid=144262

Flutter Bloc

https://space.bilibili.com/404904528/channel/detail?cid=177519

Flutter Getx4

https://space.bilibili.com/404904528/channel/detail?cid=177514

Docker Yapi

https://space.bilibili.com/404904528/channel/detail?cid=130578

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 表情是什么,我认为表情就是表现出来的情绪。表情可以传达很多信息。高兴了当然就笑了,难过就哭了。两者是相互影响密不可...
    Persistenc_6aea阅读 125,837评论 2 7
  • 16宿命:用概率思维提高你的胜算 以前的我是风险厌恶者,不喜欢去冒险,但是人生放弃了冒险,也就放弃了无数的可能。 ...
    yichen大刀阅读 6,093评论 0 4