- Architectural pattern/ Design philosophy: Clean architecture.
- State management: flutter_riverpod.
- To generate assets files, include: images, fonts, colors...: flutter_gen.
- Routing: go_router.
- Interact APIs: dio.
- Error handling: Use
Either
class on fpdart. - Generation code tool: build_runner.
- Local storage: shared_preferences.
This project is running on flutter version 3.24.2
.
- Open the Run/Debug Configurations dialog..
- Type a flavor in Build flavor field. For example, type the text
dev
into the field. - Click OK or Apply.
-
Open Run and debug tab.
-
Choose flavor that you want to running,
Run on dev
orRun on prod
flavor.NOTE: You can edit the configuration in
/.vscode/launch.json
.
-
Single terminal command:
-
Get package dependencies:
flutter pub get
-
Generate localization files:
flutter gen-l10n
-
Generate native splash:
dart run flutter_native_splash:create --flavors [YOUR_FLAVOR]
-
Generate necessary files (assets, generation class...):
-
To delete conflicting classes and re-generate, run:
dart run build_runner build -d
-
To generate without delete conflicting outputs, run:
dart run build_runner build
-
-
-
All-in-one terminal command for getting dependencies, generating files, and more:
-
Syntax:
sh make.sh --flavor=[YOUR_FLAVOR] -f -r
Parameters:
--flavor=[YOUR_FLAVOR]
(Required): Run the terminal with a specific flavor, e.g.,--flavor=dev
.-f
(Optional): Run withFVM
.-r
(Optional): Run the app after generating files.-c
(Optional): Delete thebuild/
and.dart_tool/
directories.
-
Example:
sh make.sh --flavor=dev -f -r
-
-
(Optional)
- To update all dependencies in pubspec.yaml file to latest version, run:
flutter pub upgrade --major-versions --tighten
- To update all dependencies in pubspec.yaml file to latest version, run:
Two ways to run the project:
-
Click on
Run
orDebug
in the IDE. -
Terminal command:
flutter run --flavor=dev
or use the all-in-one terminal command with the
-r
flag:sh make.sh -r