当我尝试运行代码时,出现错误
错误:参数类型“首页功能(动态)”不能为 分配给参数类型“小部件”。 (argument_type_not_assignable 在[ttt] lib \ main.dart:37)
完整的代码
return
MaterialApp(
home: SplashScreen.navigate(
name: 'tic.flr',
next: (context) => HomePage(),
until: () => Future.delayed(Duration(seconds: 5)),
startAnimation: '1',
),
);
答案 0 :(得分:1)
您尝试只传递小部件吗?所以:
next: HomePage(),