Skip to main content

removeAllAndPush method

Future removeAllAndPush (String routeName, String tillRoute, {dynamic arguments})

<p>This function remove all the routes till the particular route and add new route.</p> <p>params:</p> <ul> <li><code>routeName</code> : route that need to add</li> <li><code>tillRoute</code> : remove all route until this route.</li> <li><code>arguments</code> : necessary data for the route</li> </ul>

Implementation

Future\<dynamic\> removeAllAndPush(
String routeName,
String tillRoute, \{
dynamic arguments,
\}) \{
return navigatorKey.currentState!.pushNamedAndRemoveUntil(
routeName,
ModalRoute.withName(tillRoute),
arguments: arguments,
);
\}