Skip to main content

Environment configuration

Vantage uses --dart-define-from-file to inject credentials at build time. Your real keys stay out of source control.
cd vantage_wealth
cp .env.example.json .env.json
Edit .env.json:
{
  "SUPABASE_URL": "https://your-project.supabase.co",
  "SUPABASE_ANON_KEY": "your-anon-key",
  "API_BASE_URL": "http://your-backend-url:8000"
}
API_BASE_URL values:
DeviceValue
Android emulatorhttp://10.0.2.2:8000
Physical device (USB/WiFi)http://192.168.x.x:8000 (your machine’s LAN IP)
VPN/Tailscalehttp://100.x.x.x:8000
Productionhttps://api.yourdomain.com

Run in development

flutter pub get
flutter run --dart-define-from-file=.env.json

Build release APK

flutter build apk --release --dart-define-from-file=.env.json
Install on your device:
adb install build/app/outputs/flutter-apk/app-release.apk

Code generation

If you modify any @freezed models or add Riverpod providers with @riverpod:
dart run build_runner build --delete-conflicting-outputs

Run analysis

flutter analyze   # must return 0 errors
flutter test      # run unit + widget tests