https://github.com/hungps/flutter_starter
https://github.com/hungps/flutter_starter
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hungps/flutter_starter
- Owner: hungps
- Created: 2023-04-03T08:37:57.000Z (about 3 years ago)
- Default Branch: develop
- Last Pushed: 2025-02-05T18:48:34.000Z (over 1 year ago)
- Last Synced: 2025-05-07T10:52:46.656Z (about 1 year ago)
- Language: Dart
- Size: 573 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# flutter_starter
A new Flutter project.
## Getting Started
- Install [Fvm](https://fvm.app/docs/getting_started/installation).
- Go to this project folder and run `fvm install` to install the correctsponding Flutter SDK version.
> If you are not using Fvm, make sure your Flutter version in your local machine matched with the `.fvm/fvm_config.json`
- Run `flutter doctor` and make sure that there is no error occurred.
> This project is optimized for [Visual Studio Code](https://code.visualstudio.com/) users
## Developing
### Running the app
- Run `flutter run --flavor=dev -t lib/main_dev.dart` to run the app in development environment.
- Run `flutter run --flavor=staging -t lib/main_staging.dart` to run the app in staging environment.
- Run `flutter run --flavor=production -t lib/main_production.dart` to run the app in production environment.
### When adding a new translated text
- Add the translated text to `lib/presenter/languages/translations/.json`
- Run this script to generate the translation keys
```bash
flutter pub run easy_localization:generate \
-f keys \
-S lib/presenter/languages/translations \
-O lib/presenter/languages \
-o translation_keys.g.dart
```
> If you are using Visual Studio Code, you can run this script by pressing `Cmd + Shift + P` and type `Run Task` and select `easy_localization: generate keys`
### When adding new page
- Run this script to activate `mason_cli` (if you haven't done it before)
```bash
flutter pub global activate mason_cli
mason get
```
- Run this script to generate a new page with basic cubit
```bash
mason make bloc_page
```
> If you are using Visual Studio Code, you can run this script by pressing `Cmd + Shift + P` and type `Run Task` and select `mason: bloc_page`