Files
DriverVault/Phone App/lib/config.dart
T
2026-07-06 08:50:52 +02:00

15 lines
683 B
Dart

// Default base URL of the Car Control API Server. The phone app talks ONLY to
// the API Server (never to PocketBase directly).
//
// This is only the DEFAULT — the user can override it at runtime from the login
// screen's "Server settings" (persisted to SharedPreferences). The compile-time
// value here is used when there's no saved override.
//
// - Flutter web build on this PC: http://localhost:8080/api works.
// - Real phone on the LAN: set it in Server settings (or at build time via
// flutter run --dart-define=API_BASE=http://10.2.1.10:8080/api)
const String kDefaultApiBase = String.fromEnvironment(
"API_BASE",
defaultValue: "http://localhost:8080/api",
);