In my app i have three screens login , verifyotp , generatepass. I know how to move from one page to other page eg: Navigator.pushNamed(context, \"/theNameOfThePage\");
Navigator.pushNamed(context, \"/theNameOfThePage\");
Full clean of Navigator's history and navigate to new route:
void _logout() { Navigator.pushNamedAndRemoveUntil(context, "/newRouteName", (r) => false); }