- Maintenance update
- Remove dependency on test package, conflicts with latest Flutter
- Update docs
- Update example dependencies to latest versions
- Apply stricter analysis options
- Add
onDidChange
-- This callback will be run after the ViewModel has changed and the builder method is called - Add
onInitialBuild
-- This callback will be run after the builder method is called the first time
- Add more advice to error message
- Updated to work with latest version of Redux: 3.0.0
- Update example to wrap entire app with StoreProvider
- Throw more helpful error message if no StoreProvider is found in the tree
- Works with Dart 2 (no longer supports Dart 1)
- Stronger Type info Required
- Breaking Changes:
StoreProvider
now requires generic type info:new StoreProvider<AppState>
new StoreProvider.of(context).store
is nowStoreProvider.of<AppState>(context)
- Add
onWillChange
. This function will be called before the builder and can be used for working with Imperative APIs, such as Navigator, TextEditingController, or TabController.
- Add
onWillChange
. This function will be called before the builder and can be used for working with Imperative APIs, such as Navigator, TextEditingController, or TabController.
- Bugfix:
onInit
was not called before the initial ViewModel is constructed.
- Fix Changelog.
- Optional
onDispose
function - TheStoreConnector
andStoreBuilder
Widgets now accept anonDispose
function that will be run when the Widget is removed from the Widget tree (using State.dispose under the hood). TheonDispose
function takes the Store as the first parameter, and can be used to dispatch actions that remove stale data from your State tree. - Move to github
- Optional
onInit
function - TheStoreConnector
andStoreBuilder
Widgets now accept anonInit
function that will be run the first time the Widget is created (using State.initState under the hood). TheonInit
function takes the Store as the first parameter, and can be used to dispatch actions when your Widget is first starting up. This can be useful for data fetching. ignoreChange
function -StoreConnector
now takes an advanced usage / optional functionignoreChange
. It will be run on every storeonChange
event to determine whether or not theViewModel
andWidget
should be rebuilt. This can be useful in some edge cases, such as displaying information that has been deleted from the store while it is animating off screen.- Documentation updates
- Add the ability to build only once, while avoiding rebuilding on change. This can be handy if you need to manage access to the Store, but want to handle when to update your own Widgets.
- Make
StoreProvider.of
a factory rather than a static method - Additional documentation based on questions from the community
- Update for Redux 2.0.0
- Update documentation
Initial Version of the library.
- Includes the ability to pass a Redux
Store
down to descendant Widgets using aStoreProvider
. - Includes the
StoreConnector
andStoreBuilder
Widgets that capture theStore
from theStoreProvider
and build a Widget in response.