Possibly, since flutter_dotenv 5.0+, it tries to read .env from AssetBundle
. This means, the file should be added as asset:
in pubspec.yaml:
flutter:
assets:
- .env
Then it means, the file will be included into build! And I am actually trying to prevent exposing my .env.