Want to route to a different screen after a state change? You can achieve this by 3 different ways:
1. Call the navigator directly (without using the ViewModel), but this is not a clean solution.
2. Set the navigatorKey and use it in a Middleware as described here
3. And another solution is what I’ve explained here which is passing the Navigator to the Action class and use it in the Middleware
So to sum up, you probably want to use a Middleware to do the navigation.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.