I have 4 page to navigate:
A > B > C > D
I use Navigator.pushReplacement for navigate from each page.
The problem is every first time run the app from vscode, when C > D it will be freeze and then I close the app from emulator and open it again (not re-run from vscode). It works well. Is this danger? what should I fix to make the app run smooth
Navigator.pushReplacement(
context,
CupertinoPageRoute(builder: (context) => Nextpages()),
);
2
Answers
Thankyou guys for the help. Apparently it's my fold. The navigator push replacement method is fine, but I'm forget to dispose all controller. So it call an event but unfortunately the page is closed, that's make the error.
I believe this is the correct way.
Route:
Push:
Pop: