A liberating app designed to free you from the hassles of expense tracking and financial management.
NOTE This repository is still under development. It's not yet ready to use.
The assets directory houses images, fonts, and any other files you want to
include with your application.
assets/images: Contains resolution-aware images.assets/i18n: Contains the localization strings for theslangpackage.
This project generates the localization strings with slang package.
The localization strings are defined in the assets/i18n directory.
The configuration file is slang.yaml.
After updating the localization strings, run the command below to generate the code:
dart run slangIf you add a new language, run
dart run slang configureYou can utilize AI models to generate the localization strings. To do so, add the strings in the base en.i18n.json,
and then run the command below:
dart run slang_gpt --api-key={openai_api_key}See slang_gpt for the details.
- Class names
- If the class encapsulates the logic or data of an action or command, use Verb + Noun
- Do:
CreateAccount,CreateAccountScreen,UpdateAccount,UpdateAccountScreen - Don't:
AccountCreate,AccountCreateScreen,AccountUpdate,AccountUpdateScreen - The class for viewing resources is an exception. We use
AccountScreenandAccountViewModelinstead ofViewAccountScreenandViewAccountViewModel.
- Do:
- If a screen class is used for both update and create, use
AccountFormScreen. - If a domain class is used as a base class for both create and update (e.g.
CreateAccountChannelandUpdateAccountChannel), useAccountChannelCommand. - The view model of a screen
AccountScreenis named asAccountViewModelinstead ofAccountScreenViewModelbecause the view model may also be used for the child widgets. The view model is bound to the concept ofAccount, notAccountScreen.
- If the class encapsulates the logic or data of an action or command, use Verb + Noun
- Widget class
- If the widget is a screen, use
XXXScreen. - If the widget is a screen that can be used for both update and create, use
XXXFormScreen. - If the widget is a dialog, use
XXXDialog. - If the widget is a child widget, use a name similar to the Flutter widget name. If it's needed to disambiguate from other business classes, use suffix
View, such asTransactionListView.
- If the widget is a screen, use
- Route path
- Use
resource+action. - For example,
/trasactions/:id/view,/transactions/:id/update,/transactions/view - Action is needed even if it's only for viewing a resource because otherwise
/transactions/:idand/transactions/viewwill conflict.
- Use
This project uses freezed to generate models.
If you update the model classes, run the following command to generate the models:
dart run build_runner build --delete-conflicting-outputsOr, use the command below to continuously watch for changes:
dart run build_runner watch -dThe env directory contains environment variables for different flavors.
- Create a new file in the
envdirectory with the appropriate flavor name (e.g.,dev.jsonfor development) - Add environment variables following the same structure as existing files
- Update
productFlavorsinandroid/app/build.gradleto include the new flavor - Run
flutter run --flavor dev --dart-define-from-file env/dev.jsonto load the environment variables.
For dev environment:
flutter run --flavor dev --dart-define-from-file env/dev.jsonFor prod environment:
flutter run --flavor prod --dart-define-from-file env/prod.json