How to Navigate from ChangeNotifier?
问题 I am learning about provider + ChangeNotifier for state management, but I can't find any official guidance on how to implement a Navigation from a ChangeNotifier . Let's say we improve the provider_shopper sample here, so when the user clicks BUY, the CartModel does some buying logic and then Navigates to a Order Review page. How's this navigation should be implemented? Do we provide a callback for the CartModel , so it will call it and trigger a Navigation on the UI? 回答1: There might be a