flutter navigation clean way code example
Example: flutter clear navigation stack
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (BuildContext context) => LoginPage(),
),
(route) => false,
);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (BuildContext context) => LoginPage(),
),
(route) => false,
);