16 lines
476 B
Dart
16 lines
476 B
Dart
class AppConfig {
|
|
const AppConfig({required this.apiBaseUrl});
|
|
final String apiBaseUrl;
|
|
factory AppConfig.fromEnvironment() {
|
|
const url = String.fromEnvironment(
|
|
'JINZHI_API_BASE_URL',
|
|
// defaultValue: 'http://localhost:8088',
|
|
// defaultValue: 'https://jince.api.xianlin88.top',
|
|
defaultValue: 'https://jinzhi.api.yqzhice.top',
|
|
|
|
// defaultValue: 'http://8.153.17.57',可测试ip
|
|
);
|
|
return const AppConfig(apiBaseUrl: url);
|
|
}
|
|
}
|