I have several Page.
1. Start Page
2. Page 2
3. Page 3
4. Main Menu
From 1 -> 2. and 2 -> 3. i use this for navigation :
Navigator.of(context).push(new MaterialPageRoute<MyPage>(
builder: (BuildContext context) {
return new MyPage();
},
));
and for 3 -> 4. I want to use this (Push Replacement, will not going back), but it doesnt work and act like normal Push:
Navigator
.of(context)
.pushReplacement(new MaterialPageRoute(builder: (BuildContext context) {
return new MainMenuPage();
}));
Confusing.