Using Flutter-dotenv for build release

508 views Asked by At

I have made a Flutter application that uses flutter_dotenv v5.0.2 and the .env file has API keys stored and API URLs that is private. The app and APIs are working fine in debug mode but when I build a production build and run app-release.apk the API are not working.

Do I have to do anything else to use .env file in production mode??

The app is working fine in debug mode and I built the app for production and installed the app-release.apk in android and the APIs are not working

1

There are 1 answers

0
Faiz Ahmad Dae On

make sure you added internet permission in manifest.xml

<uses-permission android:name="android.permission.INTERNET"/>