Iam beginner in flutter,my device is Xiaomi and i am turn off the miui optimization
so, when i run app The top part of the application is not fully visible on the phone
How can I solve this issue?
The problem:
iam tried to turn off optimization and search on youtube and google to find solutions but failed
2
Answers
Welcome to Stackoverflow: You will be required to at least show your code too
This issue is normally due missing foundational widget for building app screens such as
Scaffold()
Basically your widget needs to be a direct if not an indirect descendant of
MaterialApp()
like so:Flutter has a very helpful widget to solve problems like that, the SafeArea widget.
This widget is used to ensure that your content is displayed within the safe area of the screen. The safe area is the portion of the screen that is not covered by system UI elements like the status bar.
You can find more information and an explanatory video here.
A possible solution could be to wrap your content in this widget as suggested in the video mentioned above.