26 lines
644 B
Markdown
26 lines
644 B
Markdown
# Tloto Mobile
|
|
|
|
## API URL (compile-time)
|
|
|
|
`API_BASE_URL` is set via `--dart-define` / `--dart-define-from-file`.
|
|
Without it, the app defaults to `http://10.0.2.2:9080` (Android emulator only).
|
|
|
|
1. Copy `dart_defines.dev.example.json` → `dart_defines.dev.json`
|
|
2. Set your API base, e.g. `http://prediqo.redirectme.net:9080`
|
|
|
|
### Run
|
|
|
|
```bash
|
|
flutter run --dart-define-from-file=dart_defines.dev.json
|
|
```
|
|
|
|
### Release APK
|
|
|
|
```bash
|
|
flutter build apk --release --dart-define-from-file=dart_defines.dev.json
|
|
```
|
|
|
|
Output: `build/app/outputs/flutter-apk/app-release.apk`
|
|
|
|
A plain `flutter build apk --release` **will not** include your VPS URL.
|