get static method
Retrieves the string value for key.
Returns defaultValue if key is absent and defaultValue is provided.
Throws StateError if key is not found and no defaultValue is given.
Implementation
static String get(String key, {String? defaultValue}) {
if (_env.containsKey(key)) {
return _env[key]!;
}
if (defaultValue != null) {
return defaultValue;
}
throw StateError('BloomEnv: Missing required environment variable "$key".');
}