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
230 stars 41 forks source link

Make store available in VmFactory #93

Closed kuhnroyal closed 3 years ago

kuhnroyal commented 3 years ago

I have an old view model using getAndRemoveFirstError(). There is currently no way to access this method when building a Vm instance.

I think the store or getAndRemoveFirstError() could be added to VmFactory to solve this.

marcglasberg commented 3 years ago

getAndRemoveFirstError was already there as a getter, so you should have been able to use it already. I'll change that into a function. I don't want to add the store itself because the store state will change, and it's easy to get the wrong one from callbacks.

marcglasberg commented 3 years ago

Could you please test version 6.0.2 ?

kuhnroyal commented 3 years ago

You are right I somehow missed that, should work with both versions. Sorry for the noise.