navigator.push vs navigator.]pushedReplacement code example
Example: flutter navigation pushreplacement
void _completeLogin() {
Navigator.pushReplacement(
context, MaterialPageRoute(builder: (BuildContext context) => MyHomePage()));
}
void _completeLogin() {
Navigator.pushReplacement(
context, MaterialPageRoute(builder: (BuildContext context) => MyHomePage()));
}