[英]Flutter : Is using Native Splash Screen better?
I am using flutter_native_splash package.我正在使用flutter_native_splash package。 Which works fine.
哪个工作正常。 But what is the difference between using the native splash and a flutter page?
但是使用本机启动页面和 flutter 页面有什么区别? Is there any difference regarding performance?
性能上有什么区别吗?
when the flutter app is opened for the first time, there will be white screen for few seconds before any page is displayed.首次打开 flutter 应用程序时,在显示任何页面之前会出现几秒钟的白屏。
to tackle that issue, flutter_native_splash
can be used.为了解决这个问题,可以使用
flutter_native_splash
。 It builds a native splash screen and will be displayed for few seconds until the first UI is drawn in the flutter app.它构建了一个原生启动屏幕,并将显示几秒钟,直到在 flutter 应用程序中绘制第一个 UI。
the native splash screen can also be closed programatically if needed it until some async task is done.如果需要,本机启动画面也可以通过编程方式关闭,直到完成一些异步任务。
The flutter_native_splash displays the splash screen before the Flutter engine is finished loading. flutter_native_splash在 Flutter 引擎完成加载之前显示启动画面。 If you use a Flutter page for a splash screen, it will be loaded after the Flutter engine is finished loading and there will be a delay during which a blank white screen will be displayed.
如果您使用 Flutter 页面作为启动画面,它将在 Flutter 引擎完成加载后加载,并且在此期间会有延迟显示空白屏幕。
(Full disclosure - I maintain the flutter_native_splash package) (完全披露——我维护了 flutter_native_splash 包)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.