15 lines
385 B
Dart
15 lines
385 B
Dart
class Env {
|
|
// Base URL de l'API, surchargeable à la compilation via --dart-define=API_BASE_URL
|
|
static const String apiBaseUrl = String.fromEnvironment(
|
|
'API_BASE_URL',
|
|
defaultValue: 'https://ynov.ptits-pas.fr',
|
|
);
|
|
|
|
// Construit une URL vers l'API v1 à partir d'un chemin (commençant par '/')
|
|
static String apiV1(String path) => "${apiBaseUrl}/api/v1$path";
|
|
}
|
|
|
|
|
|
|
|
|