Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributedotenv

Load environment variables at runtime from a .env file.

pub.devRemove
flutter_dotenv

Loads configuration variables from .env asset files or strings into Flutter apps.

pub.devRemove
ScoresHealth5089 (best)
Maintenance197 (best)
Quality89100 (best)
Popularity8093 (best)
Community69 (best)45
Compatibility85100 (best)
UsageDownloads (30 days)160k1M (best)
Likes1542.2k (best)
Pub points135 / 160160 / 160 (best)
GitHub stars116246 (best)
MaintenanceLatest release4.2.0, 3 years ago6.0.2, 7 days ago (best)
Major versions in 12 months00
Contributors618 (best)
Publisherpracticalflutter.comUnverified
FitPlatformsAll (pure Dart)Android, iOS, Web, Windows, macOS, Linux
WASM-readyNoYes
KindPure DartFlutter widgets
Code generationNoNo
Direct dependencies20 (best)
LicenseMITMIT
Setup effortLowLow
JudgementStrengths
  • Easy to configure with support for multiple file paths and variable substitution.
  • Includes a command-line interface helper to initialize and test .env files.
  • Built-in typed getters (`getInt`, `getDouble`, `getBool`) with optional fallbacks
  • Supports multiple environment layering via `overrideWithFiles` and programmatic overrides via `mergeWith`
  • Handles variable interpolation (`$BASE_URL/v1` and `${BASE_URL}/v1`) natively
Weaknesses
  • Does not expose the underlying map directly since version 4.0.0, requiring forwarding methods.
  • Does not inject variables at compile time.
  • Insecure for confidential secrets since asset files are bundled publicly within client builds
  • Requires `.env` files to be manually registered under the Flutter `assets` section in `pubspec.yaml`
WarningsNoneNone
dotenv vs flutter_dotenv: which Flutter package should you use? | pubscout