marcglasberg / async_redux

Flutter Package: A Redux version tailored for Flutter, which is easy to learn, to use, to test, and has no boilerplate. Allows for both sync and async reducers.
Other
234 stars 40 forks source link

Bug: StoreConnector shouldUpdateModel #43

Closed raphFlash closed 4 years ago

raphFlash commented 4 years ago

In the StoreConnector, the documentation of the shouldUpdateModel model says :

To ignore a change, provide a function that returns true or false. If the returned value is false, the change will be ignored

But the view is rebuilt when the returned value is false and ignored when the value is true.

I guess the problem is here in the _StoreStreamListener

if (widget.shouldUpdateModel != null) { _stream = _stream.where((state) => !widget.shouldUpdateModel(state)); }

marcglasberg commented 4 years ago

You are absolutely right. Please upgrade to version 2.5.0 for the fix. Thanks.