I've built simple meme/photo editor app using flutter.It is working perfectly in debug mode but It's not working in release mode.There is a container in my app which is used to show user image loaded using image picker.When I select image in debug app it's showing but when tried it in release version It shows only a blank container and also it alignments are changed.I've tried flutter clean and have added the Internet permission to manifest file.But nothing correct that issue.
Also I've tried app bundle and split apks but Issue is remaining.Is there any method to generate and upload debug apk to playstore without getting any security issues?
This is the part with issues...It is working correctly in debug but not in release mode.
Center(child: Stack(
children: <Widget>[
_image != null ? Expanded(
child: Container(
child: Image.file(
_image,
height: 400,
width: 400,
fit: BoxFit.cover,),
),
)
By what you've shared (which is not a lot) I can assume you've missed adding the INTERNET permission on the main manifest.
Usually 3 manifests are created. Open your android/app/src folder, you'll see 3 subfolders:
It's easy to be mistaken and put the permission in the wrong Manifest, I've been there some times!
It's probably because your app requires internet connection, but you haven't specified this permission in your AndroidManifest.xml file at: YOUR_PROJECT/android/app/src/main/AndroidManifest.xml
Confirm whether the internet permission is enabled.
Before:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application...
Now:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<application..
I hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With