popAndPushScreen method
Future popAndPushScreen (String routeName, {dynamic arguments})
This function pop the initial route and push the new route to the navigator.
params:
routeName
arguments
: necessary data for the route
Implementation
Future<dynamic> popAndPushScreen(String routeName, {dynamic arguments}) {
navigatorKey.currentState!.pop();
return pushScreen(routeName, arguments: arguments);
}