# flutter_dotenv

> Load configuration into a Flutter app from a .env file

Source: https://talira.ai/catalog/flutter-dotenv-kd30crdp
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / configuration](https://talira.ai/categories/libraries/configuration), [languages / dart](https://talira.ai/categories/languages/dart)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [James Collins](https://talira.ai/orgs/java-james.md)
- Forked from [dotenv (Dart)](https://talira.ai/catalog/dotenv-dart-7gcpndze.md).

flutter_dotenv loads configuration into a Flutter app from a .env file bundled as an asset, or from a string. After `dotenv.load()` you read values anywhere with typed getters and fallbacks, and it supports variable interpolation, quoting rules, override files, programmatic values merged on top and, where `dart:io` is available, system environment variables. Values end up inside the app binary, so it's for public client-side configuration, not secrets. It began as a fork of the dotenv package for Dart.

## Links

- GitHub: https://github.com/java-james/flutter_dotenv

## Problems it solves

- keep API URLs and feature flags for my Flutter app in a .env file
- switch Flutter app configuration between staging and production
- read environment variables in a Flutter app like dotenv does elsewhere

## Features

- load a .env asset or a string at startup
- typed getters (int, bool, double) with fallbacks
- variable interpolation with double quotes, none with single quotes
- override files and programmatic values merged with set precedence
- merge system environment variables where dart:io is available

## Limitations

- Values are bundled into the app binary and can be extracted, so it must not hold secrets such as API keys or tokens.[^1]

## Trust

Overall: 0.42 out of 1.
Signals: maintenance 0.61, adoption 0.48, momentum 0.17, community 0.52, backing 0.30, extensibility 0.00.

- last commit 15 days ago
- 2 commits in the last 90 days
- 246 GitHub stars
- 19 contributors
- accepts sponsorship (Github, Buy Me A Coffee)
- backed by James Collins

## Related

- Works with [Flutter](https://talira.ai/catalog/flutter-nhwgvsth.md)

## Alternatives

- [dotenv (Dart)](https://talira.ai/catalog/dotenv-dart-7gcpndze.md): Load environment variables at runtime from a .env file in Dart

## Sources

[^1]: https://github.com/java-james/flutter_dotenv/blob/master/README.md (checked 28 Nov 2026)
[^2]: https://github.com/java-james/flutter_dotenv/blob/master/LICENSE (checked 28 Nov 2026)
