Env class
Environment access.
Properties
Methods
-
get(
String key, [String defaultValue = '']) → String - Get a string with default.
-
getBool(
String key, [bool defaultValue = false]) → bool - Get a bool env var.
-
getInt(
String key, [int defaultValue = 0]) → int - Get an int env var.
-
getList(
String key, [List< String> defaultValue = const []]) → List<String> - Get a list env var (comma-separated).
-
has(
String key) → bool - Check if an env var is set.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
require(
String key) → String - Require an env var (throws if missing).
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String key) → String? - Get a string env var.
Static Methods
-
setTestingValues(
Map< String, String> ? values) → void - Overrides environment values for tests. Pass null to reset.