A sample Flutter app that shows how to manage responsive state using the bloc pattern.
- Using a bloc pattern for global app state (i.e. Theme)
- Using a bloc pattern as a view model for a screen
- Using an
InheritedWidgetProvider to make the blocs accessible
- Consumption of bloc using
- App and screen state saves when changed and is loaded on startup
- An instrance of
SharedPreferencesis creeated globally as a singleton
- Blocs are able to save and load their own state
- Can change between light and dark theme.
- Implemented as a bloc.
Subscribe to Flutter Awesome
Get the latest posts delivered right to your inbox