A sample Flutter app that shows how to manage responsive state using the provider pattern.
- Using a provider for global app state (i.e. Theme)
- Using a provider as a view model for a screen
- Using an
MultiProviderto make the providers accessible
ChangeNotifierProvider<T>to make the app responsive
- Consumption of providers using
- App and screen state saves when changed and is loaded on startup
- An instrance of
SharedPreferencesis creeated globally as a singleton
- Providers are able to save and load their own state
- Can change between light and dark theme.
- Implemented as a provider.