Skip to content

Run & build

Every app is an Android flavor with its own entry point. Pick the flavor with --flavor and the entry point with -t.

Run on a device or emulator

flutter run --flavor user -t lib/main_user.dart
flutter run --flavor chef -t lib/main_chef.dart
flutter run --flavor admin -t lib/main_admin.dart
flutter run --flavor user   # uses lib/main.dart

lib/main.dart boots into DemoScreen (lib/dev/demo_screen.dart), a launcher that lists every screen in the project. It's handy for jumping straight to the screen you're working on.

Android needs --flavor

A plain flutter run without --flavor can't find the APK, because the Android build defines three flavors.

All three apps install side by side, since each one has its own application ID.

Build release APKs

flutter build apk --release --flavor user  -t lib/main_user.dart    # app-user-release.apk
flutter build apk --release --flavor chef  -t lib/main_chef.dart    # app-chef-release.apk
flutter build apk --release --flavor admin -t lib/main_admin.dart   # app-admin-release.apk

The APKs are written to build/app/outputs/flutter-apk/.

Release signing

Release builds are currently signed with the debug key (see android/app/build.gradle.kts). Add a proper keystore before publishing to the Play Store.

Tests and analysis

flutter analyze
flutter test

See Testing for what each test file covers.