fix: update production app configuration

This commit is contained in:
qzl
2026-04-30 11:07:57 +08:00
parent 79d5d0638a
commit 98f4a8d07a
21 changed files with 84 additions and 80 deletions
+3 -9
View File
@@ -1,19 +1,13 @@
import 'dart:io';
class Env {
static const _productionBackendUrl = 'https://api.meeyao.com';
static String get backendUrl {
final injected = const String.fromEnvironment('BACKEND_URL');
if (injected.isNotEmpty && injected != 'false') {
return injected;
}
if (Platform.isAndroid) {
return 'http://10.0.2.2:5775';
}
if (Platform.isIOS) {
return 'http://192.168.1.63:5775';
}
return 'http://localhost:5775';
return _productionBackendUrl;
}
static Future<void> init() async {}