报错如下:
It is necessary to start route name [./splash] with a slash: /./splash
'package:get/get_navigation/src/routes/get_route.dart':
Failed assertion: line 70 pos 16: 'name.startsWith('/')'
解决方案:
选择Getx作为路由管理的工具,使用命名跳转的方式,需要注意路由命名需要以"/"开头,例如:
abstract class AppRoutes {
#错误写法
#static const splash = 'splash';
static const splash = '/splash';
}
网友评论