java-james / flutter_dotenv

Loads environment variables from `.env`.
https://pub.dartlang.org/packages/flutter_dotenv
MIT License
220 stars 47 forks source link

[feature-request] Add the ability to load an optional env #79

Closed mirland closed 1 year ago

mirland commented 1 year ago

Right now if the asset doesn't exist it throws an error. However, in some cases, you want to load an env file only if it exists (for example for a specific environment)

On the other hand, if We want to check if the file exists before calling this method, we will perform two loads, and it's not suitable for the performance.