games_app/prediqo_mobile/README.md

31 lines
951 B
Markdown

# Tloto Mobile
## API URL (compile-time)
`API_BASE_URL` is set via `--dart-define` / `--dart-define-from-file`.
| Build | Default without dart-define |
|-------|-----------------------------|
| **Release** (`flutter build apk --release`) | `http://prediqo.redirectme.net:9080` |
| **Debug / emulator** | `http://10.0.2.2:9080` |
### Local device / custom host
1. Copy `dart_defines.dev.example.json` → `dart_defines.dev.json`
2. Set your API base, e.g. `http://prediqo.redirectme.net:9080` or `http://<PC_LAN_IP>:9080`
```bash
flutter run --dart-define-from-file=dart_defines.dev.json
```
### Release APK (production)
```bash
# Uses built-in production default, or pin explicitly:
flutter build apk --release --dart-define-from-file=dart_defines.prod.example.json
```
Output: `build/app/outputs/flutter-apk/app-release.apk`
An older APK built with only the emulator default (`10.0.2.2`) **cannot** reach the VPS — rebuild and reinstall.