CodePudding user response:
got solution try this source
Navigator.of(context, rootNavigator: true)
.pushAndRemoveUntil(
MaterialPageRoute(
builder: (BuildContext context) {
return const UserLogin();
},
),
(_) => false,
);