NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #413 most downloaded on pub.dev
Easily configure any flutter application with global variables using a `.env` file.
Last release 5 months ago
21 Apr 2026
Release timing varies
gaps range from 9 days to 1.8 years
Some releases are documented
notes for 9 of 17 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
22 releases · first in 2018
chore(release): publish 6.0.1
chore(release): publish 6.0.1
isEveryDefined() now throws NotInitializedError before load(), consistent with all other read APIsassert() with explicit if/throw in getInt(), getDouble(), and getBool() so null-safety checks are enforced in release buildsload(isOptional: true) no longer discards successfully loaded base file when an override file is missing or empty (fixes #70, #93, #101, #125)clean() now resets isInitialized to false, so accessing env after clean() correctly throws NotInitializedErrorNotInitializedError, FileNotFoundError, EmptyEnvFileError) now include informative messages in toString() instead of the unhelpful Instance of 'ClassName' (fixes #72, #127; improves diagnostics for #59, #89)FileNotFoundError and EmptyEnvFileError now carry the filename when availableNotInitializedError, FileNotFoundError, and EmptyEnvFileError now override toString() with actionable messages (e.g., FileNotFoundError: Environment file ".env" not found. Ensure the file exists and is listed under assets in pubspec.yaml.). This is not a breaking change — the class names and hierarchy are unchanged, so existing on FileNotFoundError catch clauses continue to work. FileNotFoundError now accepts an optional positional filename parameter, and EmptyEnvFileError accepts an optional named filename parameter; both default to null for backward compatibility.
In debug mode, behavior is unchanged — AssertionError was thrown before, AssertionError is thrown now.
In release mode, calling getInt(), getDouble(), or getBool() with a missing variable and no fallback previously threw a TypeError (from the null-check operator !) because assert() was stripped. It now correctly throws AssertionError with a descriptive message. If your release-mode code catches on TypeError around these methods, update it to catch on AssertionError (or on Error) instead.
clean() now resets initialization statePreviously, calling clean() only cleared the env map but left isInitialized == true. Now it also sets isInitialized = false. Code that calls clean() and then immediately accesses dotenv.env without reloading will now throw NotInitializedError. The fix is to call load() or loadFromString() again after clean().
One column per quarter.
chore(release): publish 6.0.0
chore(release): publish 6.0.0
Renamed: testLoad → loadFromString
The method has been renamed to better reflect that it can be used outside of test environments.
⚠️ Update your code to call loadFromString() instead of testLoad().
Behavior change: Empty file handling with isOptional = true
Previously, if the env file was empty and isOptional was true, the method would throw.
Now, in this case, it no longer throws and simply returns an empty env.
Supported SDK range change: Dropped support for the pre release 2.12.0-0. Now supports 2.12.0 onwards.
Nothing published for this version
Nothing published for this version
Nothing published for this version
chore(release): publish 5.2.1
chore(release): publish 5.2.1 (#117)
chore(release): publish 5.2.0
chore(release): publish 5.2.0 (#116)
int, double and bool>=2.12.0-0 <4.0.0[new] Add isOptional init param to prevent throwing if env file is not found
isOptional init param to prevent throwing if env file is not foundNothing published for this version
[fix] Change testLoad() to be synchronous
testLoad() to be synchronousget() and maybeGet() methods for getting values with a fallback[BREAKING] Wrap dotenv.dart methods within a class
load() to dotenv.load().Nothing published for this version
[BREAKING] Opt into null-safety
>=2.12.0-0 <3.0.0Nothing published for this version
Nothing published for this version
Nothing published for this version
[new] Merge with Platform.Environment
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
- Flutter compatible
Your coding agent can read these notes before it upgrades. Set up the MCP server →