如何让启动页面全屏闪烁?我得到了如何在flutter.dev设置启动页面
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
在Android模块中,转到app/src/main/res/values
打开文件名styles.xml
在此文件中,您将拥有以下代码,这是您的自定义样式:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
您需要在其中添加以下行:
<item name="android:windowFullscreen">true</item>
如下:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>