Flutter provider state management, logout concept
问题 I am trying to implement custom logout solution for my application, where no matter where user currently is, once the Logout button is clicked, app will navigate back to Login page . My idea was, that instead of listening on every component for state changes, I would have one single listener on a master component -> MyApp . For the sake of simplicity, I have stripped down items to bare minimum. Here is how my Profile class could look like: class Profile with ChangeNotifier { bool