getOrFail method

  1. @override
String getOrFail(
  1. String key
)
override

Returns the value of the key or throws an exception if not found.

Implementation

@override
String getOrFail(String key) {
  final value = _env[key];
  if (value == null) {
    throw Exception('Environment variable "$key" is not set.');
  }
  return value;
}