Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter iOS release and profile builds are not working properly

I have a very weird problem, which I just can't solve: I want to test my app on my iPhone and testing the app over the day in different locations. So I need to make a profile or release build to have the app installed on my phone. Debug mode is working great, I have all UI-Elements properly on the screen. However, in profile AND release mode half of the main screen UI is not shown. I have some Card-Widgets in a Grid view and below that a Divider-Widget with another Card-Gridview beneath. All of this is not shown. I had this problem on Windows with a Huawei too. Only Debug-Mode works properly. Do you have any ideas on how to fix it?

The elements in the red box are not shown. All Elements in the red box are not shown.

like image 880
benicamera Avatar asked Nov 16 '20 08:11

benicamera


People also ask

How do you run in release mode on flutter?

To compile in release mode, we just need to add the --release flag to the flutter run command and have a physical device connected. Although we can do so, we typically do not use the flutter run command with the --release flag.

Does flutter support iOS 14?

We're delighted to introduce our latest release of Flutter, with extensive support for iOS 14 and Android 11.


Video Answer


1 Answers

In flutter rendering of the px of the widgets is taken carefully by flutter.I don't think this is a flutter or build issue. It seems like you are using the Stack widget from flutter

In my view, this is due to following,

  • You could have used stack widgets with pixel values(will be acting as absolute positioning which is not the same for all the devices)
  • It can be due to different device sizes(all devices are not the same width and height).

Hopefully, this could be the issue in widgets itself. Please use dynamic pixels if you use stack, positioned or similar type of widgets.

Please Attach the code along with the question for further debugging

like image 165
Balaji Venkatraman Avatar answered Nov 15 '22 06:11

Balaji Venkatraman