Tips: Flutter – Stack
@ Push widget into stack.
Navigator.of(context).push(route);
@ Pop widget from stack.
Navigator.of(context).pop();
@ Clear stack and back to root widget.
Navigator.of(context).popUntil((route) => route.isFirst);
@ Clear stack and reload root widget.
Navigator.of(context).pushAndRemoveUntil(route, ModalRoute.withName(“/”));
@ Clear stack and replace root widget.
Navigator.of(context).pushAndRemoveUntil(route, ModalRoute.withName(“”));