Files
flutterApp/lib/core/env/env_config.dart

28 lines
801 B
Dart
Raw Normal View History

2026-01-21 13:27:55 +08:00
class EnvConfig {
static const String environment = String.fromEnvironment(
'ENV',
2026-07-11 16:46:53 +08:00
defaultValue: 'prod',
2026-01-21 13:27:55 +08:00
);
static String get sentryDsn {
// 根据环境切换 DSN(去 Sentry 后台创建两个项目:Test 和 Prod)
if (environment == 'prod') {
return 'https://d5fdda78335793935593efa3f4ed11bb@o4510984107261952.ingest.de.sentry.io/4510984527937616';
2026-01-21 13:27:55 +08:00
}
return 'https://1a72051f8ac6c21cde96ded18a318217@o4510984107261952.ingest.de.sentry.io/4510984468824144';
2026-01-21 13:27:55 +08:00
}
static bool get isProduction => environment == 'prod';
2026-07-11 16:46:53 +08:00
/// TCP 服务器配置
static String get tcpIp => '1.95.137.212';
static int get tcpPort {
// 测试服: 59016, 生产服: 9001
if (environment == 'prod') {
return 9001;
}
return 9001; // TCP 端口
}
2026-01-21 13:27:55 +08:00
}