Connect with us

Code

Cashew – Personal finances on Flutter

Cashew is a full-fledged, feature-rich application designed to empower users in managing their finances effectively. Built using Flutter – with Drift’s SQL package, and Firebase – this app offers a seamless and intuitive user experience across various devices. Development started in September 2021.

Developer Notes

Android Release

  • To build an app-bundle Android release, run flutter build appbundle --release.

Note: required Android SDK.

iOS Release

  • To build an IPA iOS release, run flutter build ipa.

Note: requires MacOS.

Firebase Deployment

  • To deploy to firebase, run firebase deploy

Note: required Firebase.

GitHub release

Scripts

deploy_and_build_windows.bat

  • Deploy to Firebase and build the apk and appbundle

open_release_builds.bat

  • Opens the location of the built apk and appbundle

update_translations.bat

  • Downloads the latest version of Cashew translations. Runs budget\assets\translations\generate-translations.py

Develop Wirelessly on Android

  • adb tcpip 5555
  • adb connect <IP>
  • Get the phone’s IP by going to About Phone > Status Information > IP Address

Migrate Database

  1. Make any database changes to the schema and tables
  2. Bump the schema version
    • Change int schemaVersionGlobal = ...+1 in tables.dart
  3. Make sure you are in application root directory
    • cd .\budget\
  4. Generate database code
    • Run dart run build_runner build
  5. Export the new schema
  6. Generate step-by-step migrations
    • Run dart run drift_dev schema steps drift_schemas/ lib\database\schema_versions.dart
  7. Implement migration strategy
    • Edit await stepByStep(...) function in tables.dart and add the migration strategy for the new version migration

Get Platform

  • Use getPlatform() from functions.dart
  • Since Platform is not supported on web, we must create a wrapper and always use this to determine the current platform

Push Route

  • If we want to navigate to a new page, stick to pushRoute(context, page) function from functions.dart
  • It handles the platform routing and PageRouteBuilder

Wallets vs. Accounts

  • Wallets have been been renamed to Accounts on the front-end but internally, the name Wallet is still used.

Objectives vs. Goals

  • Objectives have been been renamed to Goals on the front-end but internally, the name Objectives is still used.
Cashew on GitHub: https://github.com/jameskokoska/Cashew/
Platform: Flutter
⭐️: 96
Advertisement

Trending