Flutter iOS release and profile builds are not working properly
Asked Answered
F

2

6

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.

Fairish answered 16/11, 2020 at 8:14 Comment(1)
Please update the question with relevant code..Grandniece
C
1

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

Carper answered 25/11, 2020 at 17:45 Comment(0)
S
-1

You have to cross-check it in development mode. I suggest there are several pixel overflows including different widgets (In development (debug) mode, they are explicitly displayed as overflows). But in release and profile, they are not displayed and therefore the components just overflow.

I would suggest you just try to reproduce this behaviour in debug mode, the console will then display all overflows for each widgets.

Selfregard answered 24/11, 2020 at 16:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.