GetX - How replace an old route with a new route?

Viewed 1776

Navigator.of(context).replace<T>(oldRoute: oldRoute, newRoute: newRoute);
How to using this origin Flutter Api in Getx?

I am using the named routes in project like this :

GetPage(
    name: Routes.SELECTTARGET,
    page: () => TargetPage(),
    binding: TargetBinding(),
    fullscreenDialog: true)

Another problem:
I am trying using
Navigator.of(Get.context!).push(GetPageRoute(settings: RouteSettings(name: Routes.TARGETDETAIL, arguments: target.clone())));
But error occus:

Null check operator used on a null value

How to do

1 Answers
Related