Follow the documentation here. In your pubspec don't forget to add assets
property. My folder structure is
- /
- bin
- env_testing
- env_testing.dart
- env_testing
- env
- dev.env
- stag.env
- bin
So the path in assets would be
...
assets:
- env/dev.env
- env/stag.env