environment property
EnvironmentType
get
environment
Returns the currently active environment type.
Defaults to:
- EnvironmentType.test in debug mode
- EnvironmentType.live in release mode
- EnvironmentType.system otherwise
Implementation
EnvironmentType get environment {
if (i._environment != null && i._environment != EnvironmentType.system) {
return i._environment!;
}
if (kDebugMode) return EnvironmentType.test;
if (kReleaseMode) return EnvironmentType.live;
return EnvironmentType.system;
}
set
environment
(EnvironmentType type)
Updates the current environment and notifies listeners.
Implementation
set environment(EnvironmentType type) {
i._environment = type;
i.notifyListeners();
}