flutterdart

Flutter release apk not working correcty but debug app works fine


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,),
                              ),
                            )

Solution

  • Problem disappeared when I replaced the expanded with container..Thanks for support