class Constants { Constants._(); static const String env = envProd; static const String envDev = 'dev'; static const String envTest = 'test'; static const String envProd = 'prod'; static const String _devBaseUrl = "https://ws00.by.takin.cc";//"http://192.168.10.230:8880"; static const String _testBaseUrl = "https://central-test.atmob.com"; static const String _prodBaseUrl = "https://project-api.atmob.com"; static const String _locationProdClientUrl = "wss://project-api.atmob.com/websocket/"; static const String _locationDevClientUrl = "wss://ws00.by.takin.cc/websocket/"; static const String _locationTestClientUrl = "wss://central-test.atmob.com/websocket/"; static String baseUrl = getBaseUrl(); static bool isProdEnv() { return Constants.env == Constants.envProd; } static const String appDefaultChannel = "Android"; static const int appDefaultAppId = 0; static const int appDefaultTgPlatformId = 0; static const String appChanelName = "app_channel_name"; static const String appChannelId = "app_channel_id"; static const String appTgPlatformId = "app_tg_platform_id"; static const String mineLocationId = ''; static const String traceStartId = '-100'; static const String traceEndId = '-200'; static const String tracePopupId = '-300'; static const String traceErrorId = '-400'; static const String traceNormalLineId = '-1000'; static const String traceSelectLineId = '-2000'; static const double blurredX = 4.2; static const double blurredY = 4.2; static const String keyLastSelectFriendId = 'key_last_select_friend_id'; //此字段用于标记当前网络状态为移动网络 static const String kMobileNetworkTag = ""; } String getBaseUrl() { switch (Constants.env) { case Constants.envDev: return Constants._devBaseUrl; case Constants.envTest: return Constants._testBaseUrl; case Constants.envProd: return Constants._prodBaseUrl; default: return Constants._devBaseUrl; } } String getLocationClientUrl() { switch (Constants.env) { case Constants.envDev: return Constants._locationDevClientUrl; case Constants.envTest: return Constants._locationTestClientUrl; case Constants.envProd: return Constants._locationProdClientUrl; default: return Constants._locationProdClientUrl; } }