DotEnv class

Constructors

DotEnv({String filePath = '.env'})
A class that works as a bridge between .env file and dart code.

Properties

filePath String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createNew({dynamic recrusive = false}) bool
Create evv filePath if not exists.
exists() bool
Returns a bool indicating whether the filePath exists or not.
get(String key) String?
Get a value from the .env file.
getDotEnv() Map<String, String>
Get the content of the .env file as a Map<String, String> object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveDotEnv() bool
Save The DotEnv config to filePath.
set(String key, String value) Map<String, String>
Update a value in env
toString() String
Get the value of env as a String.
override

Operators

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