DefaultEnvPlugin class final
Reads configuration from a .env asset through flutter_dotenv.
It loads into flutter_dotenv's global dotenv, so use one
DefaultEnvPlugin per app.
Constructors
-
DefaultEnvPlugin({String fileName = '.env', Map<
String, String> defaults = const {}})
Properties
-
defaults
→ Map<
String, String> -
Values used when the env file doesn't set a key. Values in the file
always win.
final
- fileName → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
finalinherited
Methods
-
all(
) → Map< String, String> -
Returns a map of all environment variables.
override
-
clear(
) → void -
Clears all the environment variables.
override
-
dispose(
) → Future< void> -
override
-
get(
String key, {String? fallback}) → String -
Returns the value of the environment variable specified by
key, or thefallbackvalue if not found.override -
init(
) → Future< void> -
override
-
maybeGet(
String key, {String? fallback}) → String? -
Returns the value of the environment variable specified by
key, or thefallbackvalue if not found, or null if neither is found.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited