pushAndPop method
Push and pop the current route
Implementation
void pushAndPop(BuildContext context) {
Navigator.of(context).pop();
push(context);
}
Push and pop the current route
void pushAndPop(BuildContext context) {
Navigator.of(context).pop();
push(context);
}