I have a simple Flutter app and I want to remove all previous routes but I want to do with GetX, How to do that?
Now it works with
Navigator.of(context).pushNamedAndRemoveUntil('/home', (Route<dynamic> route) => false);
But I want to know the correct way with Get.to
or similar
Get.offAll(Home());
of with namedRoutes:
Get.offAllNamed('/home');
More info on docs: https://github.com/jonataslaw/getx/blob/master/documentation/en_US/route_management.md
If you want remove last page then use it.
Get.off(Home());
If you want remove all previous page then use it.
Get.offAll(Home());
just simple
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With