Getx: Navigator popUntill() Equivalent needed.

Created on 23 Jul 2020  路  3Comments  路  Source: jonataslaw/getx

Is your feature request related to a problem? Please describe.
Navigator popUntill method is used to just pop routes from the stack.
In Get offNamedUntill or offNamed or back or offAllNamed are removing some routes and pushing a new route to stack.
What if we need to only pop a few routes from the stack?

Describe the solution you'd like
We can have the same as the Navigator popUntill method to remove some routes.

Describe alternatives you've considered
Navigator.of(context).popUntil((route) => route.settings.name == '/two');
current flow
Get.offNamedUntil("/two", (route) => route.settings.name=='/two');
changed to
Get.offNamedUntil((route) => route.settings.name=='/two',optional(newroute));
offNamedUntill method can be used. the predicate should be the first argument and 'newrouteName' should be optional If 'newrouteName' is not supplied we can simply pop the routes using predicate

Most helpful comment

Get.until();

All 3 comments

Get.until();

Get.until();

Thanks.
Is it mentioned in doc or readme file? It will be nicer to see all the functionalities.
Can you refer to something to check all the functionality?

@manojeeva yes it is 馃槃
image

you can also type the method in vscode and read the docs about the method
image

i just noticed that there is an typo in docs,馃槄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rupamking1 picture rupamking1  路  3Comments

NiranjanShah picture NiranjanShah  路  4Comments

omartinma picture omartinma  路  3Comments

Nipodemos picture Nipodemos  路  4Comments

ad-on-is picture ad-on-is  路  3Comments