微信 flutter 研修群 ducafecat
貓哥說
節(jié)日好伙伴們,今天這個(gè)項(xiàng)目推薦給大家她奥,主要是用了 Riverpod 狀態(tài)管理瓮增,F(xiàn)reezed 代碼生成器, Flutter 2.2 空安全
還有就是 寫了 單元測(cè)試 集成測(cè)試 Github Action,大家可以學(xué)習(xí)下哩俭。
代碼
https://github.com/salvadordeveloper/flutter-crypto-app
參考
- https://flutter.dev/docs
- https://riverpod.dev/docs/getting_started/
- https://docs.cryptowat.ch/rest-api/
正文
特性功能
- API REST (CryptoWatch) restful 拉取數(shù)據(jù)
- Linear Graph View (Hour, Day, Week, etc) 圖
- OHLC Graph 圖
- Search 搜索
- Light / Dark Theme 樣式主題
- Multi Lenguage 多語言
- Exchange Selection 交易
- Favorite Pair 收藏
技術(shù)棧
- Flutter 2.2.0
- Riverpod + Hooks 狀態(tài)管理
- Freezed 代碼生成器
- Dio http 通訊
測(cè)試
- Unit Testing (flutter_test)
- Integration Testing (integration_test)
- Mock Data (http_mock_adapter)
- Github Actions (iOS & Android Integration Test)
屏幕截圖
項(xiàng)目安裝
下載代碼
git clone https://github.com/salvadordeveloper/flutter-crypto-app
安裝包
flutter pub get
去申請(qǐng) https://cryptowat.ch/zh-cn/ 賬號(hào) api
替換 API_KEY
API_KEY={CryptoWatch_KEY}
生成代碼
flutter pub run build_runner build --delete-conflicting-outputs
運(yùn)行 app
flutter run
單元測(cè)試
flutter test
集成測(cè)試
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/main_test.dart
? 貓哥
往期
開源
GetX Quick Start
https://github.com/ducafecat/getx_quick_start
新聞客戶端
https://github.com/ducafecat/flutter_learn_news
strapi 手冊(cè)譯文
微信討論群 ducafecat
系列集合
譯文
https://ducafecat.tech/categories/%E8%AF%91%E6%96%87/
開源項(xiàng)目
https://ducafecat.tech/categories/%E5%BC%80%E6%BA%90/
Dart 編程語言基礎(chǔ)
https://space.bilibili.com/404904528/channel/detail?cid=111585
Flutter 零基礎(chǔ)入門
https://space.bilibili.com/404904528/channel/detail?cid=123470
Flutter 實(shí)戰(zhàn)從零開始 新聞客戶端
https://space.bilibili.com/404904528/channel/detail?cid=106755
Flutter 組件開發(fā)
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