如何减少Flutter launch_background.xml的显示时间?

我已在launch_background.xml文件中为启动屏幕设置了图像。切换到下一页大约需要5秒。如何减少显示时间。

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  <!--   <item android:drawable="@android:color/white" />-->

    <!-- You can insert your own image assets here -->
  <item>
        <bitmap
            android:gravity="center"
            android:src="@mipmap/splash_screen" />
    </item> 
</layer-list>

请建议如何减少显示时间?

l787922411 回答:如何减少Flutter launch_background.xml的显示时间?

我认为您正在以调试模式运行应用程序,因此这需要时间。我建议您在发布模式下运行该应用程序。通过在终端中运行此命令。

flutter run --release
  

默认情况下,flutter run编译为调试模式。您的IDE支持此模式。例如,Android Studio提供了“运行”>“调试”菜单选项,以及在项目页面上带有小三角形的绿色错误图标。

详细了解Flutter's build modes here

本文链接:https://www.f2er.com/2965070.html

大家都在问