Navigator.of(context).push(
MaterialPageRoute(
settings: RouteSettings(name: "/Page1"),
builder: (context) => Page1(),
),
);
Navigator.of(context)
.popUntil(ModalRoute.withName("/Page1"));