12 lines
307 B
Dart
12 lines
307 B
Dart
class AppConfig {
|
|
const AppConfig({required this.apiBaseUrl});
|
|
final String apiBaseUrl;
|
|
factory AppConfig.fromEnvironment() {
|
|
const url = String.fromEnvironment(
|
|
'JINZHI_API_BASE_URL',
|
|
defaultValue: 'https://jinzhi.api.local',
|
|
);
|
|
return const AppConfig(apiBaseUrl: url);
|
|
}
|
|
}
|