go static method
静态路由跳转
context
组件上下文
target
目标页面
Implementation
static void go({required BuildContext context, required Widget target}) {
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) {
return target;
}));
}
静态路由跳转
context
组件上下文
target
目标页面
static void go({required BuildContext context, required Widget target}) {
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) {
return target;
}));
}