106 lines
3.5 KiB
Markdown
106 lines
3.5 KiB
Markdown
# Display Name
|
|
|
|
A short project description
|
|
|
|
## Requirements
|
|
|
|
* Flutter <https://flutter.dev/>
|
|
* Taskfile <https://taskfile.dev/>
|
|
|
|
> **Warning** Before anything, you need to generate some files
|
|
|
|
```sh
|
|
task bootstrap # to bootstrap the project
|
|
```
|
|
|
|
## Configuration
|
|
|
|
### Environment variables
|
|
|
|
```sh
|
|
cp .env.example .env
|
|
```
|
|
|
|
This file contains the secrets variables. You need to fill them.
|
|
|
|
At the build time, the app will read the environment variables from `config.<ENV>.json` file.
|
|
|
|
You can enable/disable some features
|
|
|
|
```json
|
|
{
|
|
"FEATURE_FLAGS": "logger" // Separated by comma ","
|
|
}
|
|
```
|
|
|
|
You can also customize data source
|
|
|
|
```json
|
|
{
|
|
"DATA_SOURCE": "mock" // Or "api" for example
|
|
}
|
|
```
|
|
|
|
### Splash and icons
|
|
|
|
To generate splash screen and icons, you need to run the following command:
|
|
|
|
```sh
|
|
task gen:splash # to generate splash screen
|
|
task gen:icons # to generate icons
|
|
```
|
|
|
|
## Taskfile
|
|
|
|
### Commands
|
|
|
|
<details>
|
|
<summary>To display available commands run <code>task help</code></summary>
|
|
|
|
| Commande | Description | Aliases |
|
|
|---------------------------|---------------------------------------------------------------|--------------------------------|
|
|
| `bootstrap` | Bootstraps the project. | `bs` |
|
|
| `clean` | Cleans the environment. | `cl` |
|
|
| `decrypt-android-keys` | Decrypt Android keys | `dak` |
|
|
| `encrypt-android-keys` | Encrypt Android keys | `eak` |
|
|
| `format` | Formats the code. | `fmt` |
|
|
| `help` | Help dialog. | `h` , `default` |
|
|
| `lint` | Lints the code. | `l` |
|
|
| `build:android` | Building Android AAB | `build:a` |
|
|
| `build:ios` | Building iOS IPA | `build:i` |
|
|
| `gen:build` | Running build runner | `gen:b` |
|
|
| `gen:build-delete` | Running build runner with deletion of conflicting outputs | `gen:d` |
|
|
| `gen:clean` | Cleaning build runner | `gen:c` |
|
|
| `gen:intl` | Generating internationalization file | `gen:i` |
|
|
| `pub:get` | Getting latest dependencies | `pub:g` |
|
|
| `pub:outdated` | Checking for outdated dependencies | `pub:o` |
|
|
| `pub:upgrade` | Upgrading dependencies | `pub:u` |
|
|
| `pub:upgrade-major` | Upgrading dependencies | `pub:um` |
|
|
| `pub:validate` | Running dependency validator | `pub:v` |
|
|
| `run:dev` | Run app in development environment | `run:d` |
|
|
| `run:logs` | Show log output for running Flutter apps | `run:l` |
|
|
| `run:prod` | Run app in production environment | `run:p` |
|
|
| `run:staging` | Run app in staging environment | `run:s` |
|
|
|
|
</details>
|
|
|
|
### Parameters
|
|
|
|
You can pass flutter options to the build and run commands.
|
|
|
|
```sh
|
|
task run:staging -- -d chrome
|
|
```
|
|
|
|
> **Note** The `--` is required to pass options to the command.
|
|
|
|
### Secrets
|
|
|
|
Use:
|
|
|
|
```sh
|
|
task decrypt-android-keys
|
|
```
|
|
|
|
to decrypt the android keys (this assumes you have the passphrase in your .env file).
|