Skip to content

Update dependency flutter_dotenv to v6 - #23

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/flutter_dotenv-6.x
Open

Update dependency flutter_dotenv to v6#23
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/flutter_dotenv-6.x

Conversation

@renovate

@renovate renovate Bot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
flutter_dotenv dependencies major ^5.1.0^6.0.0

Release Notes

java-james/flutter_dotenv (flutter_dotenv)

v6.0.1

Compare Source

  • [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().

v6.0.0

Compare Source

  • [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.


Configuration

📅 Schedule: (in timezone Asia/Jerusalem)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the renovate label Sep 11, 2025
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from cf9a315 to fa3f9fe Compare October 27, 2025 14:08
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from fa3f9fe to d6bc0fb Compare February 2, 2026 16:40
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from d6bc0fb to baab953 Compare February 12, 2026 13:34
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from baab953 to 51eb439 Compare March 13, 2026 12:39
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from 51eb439 to 82b71e6 Compare March 31, 2026 17:55
@renovate renovate Bot changed the title fix(deps): update dependency flutter_dotenv to v6 Update dependency flutter_dotenv to v6 Apr 8, 2026
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from 82b71e6 to bda6c4a Compare May 12, 2026 02:54
@renovate renovate Bot added renovate and removed renovate labels May 23, 2026
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from bda6c4a to 0ad33a8 Compare June 1, 2026 23:59
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from 0ad33a8 to a2b5f0f Compare August 26, 2026 23:07
Comment thread pubspec.lock
Comment thread pubspec.lock
Comment thread pubspec.lock
Comment thread pubspec.lock
Comment thread pubspec.lock Fixed
Comment thread pubspec.lock
Comment thread pubspec.lock
Comment thread pubspec.lock
Comment thread pubspec.lock
Comment thread pubspec.lock Fixed
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from a2b5f0f to d78e091 Compare September 7, 2026 19:43
@renovate
renovate Bot force-pushed the renovate/flutter_dotenv-6.x branch from d78e091 to 39b8bb6 Compare September 8, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants