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

15 lines
332 B
Dart
Raw Normal View History

import 'dart:io';
class Env {
static String get apiUrl {
final backendUrl = const String.fromEnvironment('BACKEND_URL');
if (backendUrl.isNotEmpty && backendUrl != 'false') {
return backendUrl;
}
if (Platform.isAndroid) {
2026-03-16 16:11:28 +08:00
return 'http://10.0.2.2:5775';
}
return 'http://localhost:5775';
}
}