Flutter 加密货币应用程序
完整的 Flutter 应用,使用 Riverpod & Freezed + Dio 进行 API REST。
功能
- REST API (CryptoWatch)
- 线性图表视图(小时、天、周等)
- OHLC 图表
- Search
- 浅色/深色主题
- 多语言
- 交易所选择
- 收藏交易对
Stack
- Flutter 2.2.0 (Null Safety)
- Riverpod + Hooks
- Freezed
- Dio
测试
- 单元测试 (flutter_test)
- 集成测试 (integration_test)
- Mock 数据 (http_mock_adapter)
- Github Actions (iOS & Android 集成测试)
截图
| 首页 | 详情 | 设置 |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
项目设置
下载项目
git clone https://github.com/salvadordeveloper/flutter-crypto-app
获取 Flutter 依赖项
flutter pub get
您需要在 https://cryptowat.ch/ 上创建一个账户来获取您的个人 API KEY
将 env.example 文件重命名为 .env,并将您的 API KEY 放在其中
API_KEY={CryptoWatch_KEY}
运行应用
flutter run
如果您在生成文件时遇到任何错误,请尝试运行此命令
flutter pub run build_runner build --delete-conflicting-outputs
测试
单元测试
flutter test
集成测试
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/main_test.dart
资源
许可证
MIT License
Copyright (c) 2021 Salvador Valverde
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.






