Files
social-app/apps/lib/core/config/env.dart
T

21 lines
458 B
Dart

import 'dart:io';
class Env {
static String get apiUrl {
const url = String.fromEnvironment('API_URL');
if (url.isNotEmpty) return url;
if (Platform.isAndroid) {
return 'http://192.168.1.25:5775';
}
return 'http://localhost:5775';
}
static bool get isMockApi {
final fromDefine = const String.fromEnvironment('MOCK_API');
if (fromDefine.isNotEmpty) {
return fromDefine == 'true';
}
return false;
}
}