Navigator.of(context).replace<T>(oldRoute: oldRoute, newRoute: newRoute);
如何在Getx中使用这个原点颤动Api?
我在项目中使用命名路由,如下所示:
GetPage(
name: Routes.SELECTTARGET,
page: () => TargetPage(),
binding: TargetBinding(),
fullscreenDialog: true)另一个问题:
我正在尝试使用
Navigator.of(Get.context!).push(GetPageRoute(settings: RouteSettings(name: Routes.TARGETDETAIL, arguments: target.clone())));
但出现错误的情况如下:
Null check operator used on a null value怎么做?
发布于 2021-10-15 05:03:03
导航页面的方法如下所示:
Get.to(()=> Page()); // is same like to Navigator.push
Get.Off(()=> Page()); // is same like to Navigator.pushreplace something
for route Name :
Get.toName(RouteName.name); or Get.OfftoNamed(RouteName.name);有关更多信息,请尝试阅读文档
https://github.com/jonataslaw/getx/blob/master/documentation/en_US/route_management.md
https://stackoverflow.com/questions/69580064
复制相似问题