Skip to content

deps:(deps): bump flutter_dotenv from 5.2.1 to 6.0.1#92

Open
dependabot[bot] wants to merge 1 commit into
devfrom
dependabot/pub/dev/flutter_dotenv-6.0.1
Open

deps:(deps): bump flutter_dotenv from 5.2.1 to 6.0.1#92
dependabot[bot] wants to merge 1 commit into
devfrom
dependabot/pub/dev/flutter_dotenv-6.0.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 8, 2026

Copy link
Copy Markdown
Contributor

Bumps flutter_dotenv from 5.2.1 to 6.0.1.

Changelog

Sourced from flutter_dotenv's changelog.

6.0.1

  • [fix] isEveryDefined() now throws NotInitializedError before load(), consistent with all other read APIs
  • [fix] Replace assert() with explicit if/throw in getInt(), getDouble(), and getBool() so null-safety checks are enforced in release builds
  • Error messages now include the variable name for easier debugging
  • [fix] load(isOptional: true) no longer discards successfully loaded base file when an override file is missing or empty (fixes #70, #93, #101, #125)
  • [fix] clean() now resets isInitialized to false, so accessing env after clean() correctly throws NotInitializedError
  • [fix] Error classes (NotInitializedError, 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 available

Note on error message improvements

NotInitializedError, 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.

Note on release-build behavior change

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.

Breaking change: clean() now resets initialization state

Previously, 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().

6.0.0

  • [feat] Allow passing in override .env files on init
  • [feat] Load .env from a passed in string

Breaking changes

  • Renamed: testLoadloadFromString
    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.

Commits
  • 4f80495 chore(release): publish 6.0.1
  • eafce27 fix: isEveryDefined() now throws NotInitializedError before load()
  • 8cae9e7 chore: update readme
  • 83bcbd8 chore: update readme
  • 94f3922 chore: update readme
  • 30ecced chore: correct test name
  • 2d15c7d fix: add informative messages to error classes (#144)
  • 833fcba fix: preserve base env when optional override fails and reset init state on c...
  • 3c782c9 chore: update changelog
  • b536c85 fix: typed getters without fallback silently fail in release (#142)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [flutter_dotenv](https://github.com/java-james/flutter_dotenv) from 5.2.1 to 6.0.1.
- [Changelog](https://github.com/java-james/flutter_dotenv/blob/master/CHANGELOG.md)
- [Commits](java-james/flutter_dotenv@5.2.1...6.0.1)

---
updated-dependencies:
- dependency-name: flutter_dotenv
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Jun 8, 2026
@dependabot dependabot Bot temporarily deployed to development June 8, 2026 04:53 Inactive
@dependabot dependabot Bot deployed to development June 8, 2026 04:53 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant