显示Android和iOS的SplashScreen,但没有显示Web应用程序

发布于 2025-02-03 15:54:44 字数 238 浏览 2 评论 0原文

我正在使用 flutter_native_splash 插件以显示我的flutter应用程序的飞溅屏幕。我需要显示Android和iOS的Splash屏幕,但不能显示Web应用程序。如何禁用Web应用程序的飞溅屏幕。

提前致谢!

I am using the flutter_native_splash plugin to show a splash screen for my flutter application. I need to show the splash screen for Android and iOS, but not for the web app. How can I disable the splash screen for the web app.

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

郁金香雨 2025-02-10 15:54:45

设置

web: false

在您的配置中。

编辑:请注意,您可以避免在Web上使用飞溅屏幕,但是浏览器将在flutter Framework加载时显示白屏,因此,如果没有飞溅屏幕,您的用户将在一段时间内体验空白屏幕,取决于速度他们的联系。

Set

web: false

in your config.

Edit: note that you can avoid using a splash screen on web, but the browser will display a white screen while the Flutter framework loads, so without a splash screen, your users will experience a blank screen for some period of time depend on the speed of their connection.

So要识趣 2025-02-10 15:54:45

您可以在Kisweb上检查哪个平台:

import 'package:flutter/foundation.dart' show kIsWeb;

if (!kIsWeb) {
    //Dont show splash
}else{
    //Show splash
}

You can check what platform you're on kIsWeb:

import 'package:flutter/foundation.dart' show kIsWeb;

if (!kIsWeb) {
    //Dont show splash
}else{
    //Show splash
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文