question
Recently, I want to implement a video player. When playing in full screen, the screen needs to be rotated. I took out the case and tried it. After rotating the screen, the state is as follows
Solution
Open the project android/app/src/main/res/values/styles.xml
Add to<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
</resources>```
The startup page configuration is under LaunchTheme, and the normal page configuration is under NormalTheme
After solving
The gap in the status bar disappears
Summarize
I haven't done a native project before using flutter, and I don't know many configurations, OK!