DotEnv class

Constructors

DotEnv()

Properties

env Map<String, String>
A copy of variables loaded at runtime from a file + any entries from mergeWith when loaded.
no setter
hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clean() → void
Clear env
get(String name, {String? fallback}) String
isEveryDefined(Iterable<String> vars) bool
True if all supplied variables have nonempty value; false otherwise. Differs from containsKey by excluding null values. Note load should be called first.
load({List<String>? fileNames, Parser parser = const Parser(), Map<String, String> mergeWith = const {}}) Future<void>
Loads environment variables from the list of env files into a map Merge with any entries defined in mergeWith
maybeGet(String name, {String? fallback}) String?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processLoadedLines({required List<List<String>> linesFromEnvFiles, required Parser parser, required Map<String, String> mergeWith}) → void
testLoad({required List<String> envFilesAsStrings, Parser parser = const Parser(), Map<String, String> mergeWith = const {}}) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited