GitHub Workflow Status (branch) GitHub forks GitHub stars GitHub watchers GitHub contributors GitHub last commit GitHub top language

Flutter Keep Money 应用

thumbnail

支持空安全

项目架构(Clean Architecture Approach)

1. 为什么

* We want to determine what types of database that we use for storage (might want to change it later on)
* We want to adhere to SOLID principles since we are using OOP for this project.
* We want to ensure that UI layers do not care what is going on at the data layer at all.
* We might want to separate each layer into different packages.
2. Presentation – Domain – Data – Core – Config.
3. Presentation 层包含

* Modal Sheets
* Pages
* Widgets
* Cubits
* Cubits are important for only managing UI state based on business logic
4. Domain 层(业务逻辑层)

* Usecases (user stories)
* Repositories interface
* Typically one function, but can be more if functions are related.
* Remember, one class has one responsibility only.
5. Data 层(数据访问层)

* source
    * locals (Database)
    * remotes (API)
* Repositories (Implementation from Domain layer)
6. Models
* hive_adapters
7. 层详解

image

DI 模式

依赖注入是一种出色的设计模式,它可以消除元素之间僵化的依赖关系,使应用程序更灵活,易于扩展和维护。在该项目中,我们使用插件get_it来实现DI,并且我们还定义了类,以便您可以轻松地在DI层中实现DI

Routes

该项目已预定义命名路由

构建应用

您可以使用以下命令构建应用

适用于 Android

## development: flutter build apk -t lib/main.dart --flavor beta

## staging: flutter build apk -t lib/main.dart --flavor prod

适用于 IOS

## development flutter build ios -t lib/main.dart --flavor beta

## staging: flutter build ios -t lib/main.dart --flavor prod

资源

  * All resources (images, fonts, videos, ...) must be placed in the assets class

入门

获取依赖并生成必要文件。

我们将为您处理入职所需的生成文件!

本地化

使用此库处理多语言。请遵循本指南来理解和配置语言文件


您已经正确地完成了所有步骤,并且我保证该项目将对您学习 Flutter 的进度产生重大影响

GitHub

查看 Github