Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 像instagram一样的快速启动屏幕_Flutter_Dart - Fatal编程技术网

Flutter 像instagram一样的快速启动屏幕

Flutter 像instagram一样的快速启动屏幕,flutter,dart,Flutter,Dart,我正在尝试在我的应用程序中像instagram一样使用splashscreen。但是经过两次包装后,我无法将其复制得如此干净 切切地使用splashscreen软件包,如下所示: class MyApp extends StatefulWidget { @override _MyAppState createState() => new _MyAppState(); } class _MyAppState extends State<MyApp> { @overr

我正在尝试在我的应用程序中像instagram一样使用splashscreen。但是经过两次包装后,我无法将其复制得如此干净

切切地使用splashscreen软件包,如下所示:

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return new SplashScreen(
      seconds: 1,
      navigateAfterSeconds: new AfterSplash(),
      title: Text('Welcome In SplashScreen',
        style: TextStyle(
          fontWeight: FontWeight.bold,
          fontSize: 20.0
        ),
      ),
      image: Image.asset("assets/logo_launcher.png"),
      backgroundColor: Colors.white,
      styleTextUnderTheLoader: TextStyle(),
      photoSize: 100.0,
      loaderColor: Colors.red,
    );
  }
}
类MyApp扩展StatefulWidget{
@凌驾
_MyAppState createState()=>new_MyAppState();
}
类MyAppState扩展了状态{
@凌驾
小部件构建(构建上下文){
返回新的SplashScreen(
秒:1,
navigateAfterSeconds:新的余波(),
标题:文本(“欢迎使用SplashScreen”,
样式:TextStyle(
fontWeight:fontWeight.bold,
字体大小:20.0
),
),
image:image.asset(“assets/logo_launcher.png”),
背景颜色:Colors.white,
加载程序下的样式文本:TextStyle(),
photoSize:100.0,
装载颜色:颜色。红色,
);
}
}
问题是,当我打开应用程序时,加载splashscreen需要3~5秒。 可以复制instagram吗?点击instagram,即时打开splashscreen,不会停留在“空白页面中3~5秒”


谢谢

您需要添加和配置启动屏幕。更多信息,请访问:

向移动应用程序添加启动屏幕

苹果人机界面指南:启动屏幕

您想展示的是本机splash。您可以使用这个包:或者有几篇文章解释了实现本机splash的不同方法。您可能还想看看最近的一篇文章: