A new Flutter project.
-
Install Fvm.
-
Go to this project folder and run
fvm installto 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 doctorand make sure that there is no error occurred.
This project is optimized for Visual Studio Code users
- Run
flutter run --flavor=dev -t lib/main_dev.dartto run the app in development environment. - Run
flutter run --flavor=staging -t lib/main_staging.dartto run the app in staging environment. - Run
flutter run --flavor=production -t lib/main_production.dartto run the app in production environment.
-
Add the translated text to
lib/presenter/languages/translations/<langualge>.json -
Run this script to generate the translation keys
flutter pub run easy_localization:generate \
-f keys \
-S lib/presenter/languages/translations \
-O lib/presenter/languages \
-o translation_keys.g.dartIf you are using Visual Studio Code, you can run this script by pressing
Cmd + Shift + Pand typeRun Taskand selecteasy_localization: generate keys
- Run this script to activate
mason_cli(if you haven't done it before)
flutter pub global activate mason_cli
mason get- Run this script to generate a new page with basic cubit
mason make bloc_pageIf you are using Visual Studio Code, you can run this script by pressing
Cmd + Shift + Pand typeRun Taskand selectmason: bloc_page