currentConfig property
AppConfig
get
currentConfig
Returns the AppConfig for the active environment.
Throws StateError if setup has not been called.
Implementation
static AppConfig get currentConfig {
switch (_currentEnvironment) {
case Environment.test:
if (_testConfig == null) {
throw StateError('ConfigManager.setup() must be called before accessing currentConfig');
}
return _testConfig!;
case Environment.live:
if (_liveConfig == null) {
throw StateError('ConfigManager.setup() must be called before accessing currentConfig');
}
return _liveConfig!;
}
}