且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Flutter 应用程序在启动时显示白屏几秒钟

更新时间:2023-01-26 10:57:56

如果您看到 Activity 的黑色 窗口背景一直显示到 Flutter 呈现其第一帧,请将其添加到您的 AndroidManifest ...

If you see the black window background of the activity showing until Flutter renders its first frame, add this on your AndroidManifest, between < activity> ... < /activity>

<meta-data
       android:name="io.flutter.embedding.android.SplashScreenDrawable"
   android:resource="@drawable/launch_background"
/>