初始化
This commit is contained in:
16
lib/config/config.dart
Normal file
16
lib/config/config.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
class Config {
|
||||
///获取环境
|
||||
static String getEnv() {
|
||||
const env = String.fromEnvironment('ENV', defaultValue: 'dev');
|
||||
return env;
|
||||
}
|
||||
|
||||
///获取接口地址
|
||||
static String baseUrl() {
|
||||
if (getEnv() == 'dev') {
|
||||
return 'https://mindapp.test.tuzuu.com/api';
|
||||
} else {
|
||||
return 'https://mindapp.cells.org.cn/api';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user