A sample Flutter app that shows how to manage responsive state using the leadding state management patterns
- Using a BLoC pattern for global app state
- Using the BlocProvider pattern for accessing the model
- Using
BehaviorSubjectmethods to make elements reactive
- Using a provider for global app state
- Using a provider as a view model for a screen
- Using
ChangeNotifierProvider<T>to make the app reactive - Consumption of providers using
Provider.of<T>(context)method
- Using a
ProviderScopefor global app state - Using a
StateNotifierfor the model for a screen - Using
StateNotifierProviderto make the app reactive - Consumption of providers using
ref.watchandref.readmethod
- App and screen state saves when changed and is loaded on startup
- An instrance of
SharedPreferencesis created globally as a singleton - Providers are able to save and load their own state
