Build & Deployment
Prerequisites
- Flutter SDK >= 3.4.3
- Android SDK (min API 21)
- Java JDK for Android builds
- Access to Firebase project (google-services.json)
Firebase Configuration
The app supports two environments via separate entry points and google-services.json files:
| Environment | Entry Point | google-services.json |
|---|---|---|
| Development | lib/main_development.dart |
android/app/src/dev/google-services.json |
| Production | lib/main_production.dart |
android/app/src/prod/google-services.json |
Before building, copy the correct google-services.json:
# For production
cp android/app/src/prod/google-services.json android/app/src/google-services.json
Build Commands
Development Build
cd maxtracksapp/maxtracksapp
flutter pub get
flutter build apk
Production Build
cd maxtracksapp/maxtracksapp
flutter pub get
flutter build apk --flavor production -t lib/main_production.dart
APK Output
build/app/outputs/flutter-apk/app-release.apk
Version Management
Version is set in pubspec.yaml:
version: 1.4.7+1 # major.minor.patch+buildNumber
Before each release:
- Update version in
pubspec.yaml - Update version display string in
intro_page.dart - Build APK
- Distribute to warehouse devices
Android Configuration
| Setting | Value |
|---|---|
| Min SDK | 21 (Android 5.0) |
| App Name | Max Shipping |
| Icon | images/max_shipping_logo1.png |
| Adaptive Icon Background | White (#FFFFFF) |
Project Path
C:\maxtracksapp\maxtracksapp\
Note: The app directory is nested (maxtracksapp/maxtracksapp/) — the inner directory contains the actual Flutter project with pubspec.yaml.
Key Dependencies
| Package | Version | Purpose |
|---|---|---|
| get | 4.6.6 | State management, routing, DI |
| firebase_core | 3.1.0 | Firebase initialization |
| cloud_firestore | 5.0.1 | Database |
| firebase_storage | 12.1.0 | File storage |
| firebase_auth | 5.1.0 | Authentication |
| firebase_remote_config | 5.1.3 | Remote configuration |
| mobile_scanner | 4.0.1 | Barcode/QR scanning |
| image_picker | 1.1.2 | Camera photo capture |
| flutter_image_compress | 2.3.0 | Image optimization |
| audioplayers | 5.2.1 | Scan sound effects |
| timeline_tile | 2.0.0 | Scan history timeline |
| string_similarity | 2.1.1 | Fuzzy client name matching |
| shared_preferences | 2.2.3 | Local session storage |
| flutter_secure_storage | 9.2.2 | Secure credential storage |
| lottie | 3.1.2 | Animations |
| uuid | 4.5.1 | UUID generation |