Closed mohammadameer closed 4 years ago
The LocalPersist
class uses files to persist, and as far as I know it doesn't work in browsers. But maybe it does? I am not really sure how files work for the web because I never used it. If you test it, please tell me.
In any case, AsyncRedux can just call your persistor class, and then you can persist the state difference in any way you want. The LocalPersist
class is just a helper I am providing to make things a little bit easier for you, but it is not necessary.
Regarding the error, are you in async_redux: 2.8.4 ?
No it's 2.81
the localpersist didn't work in the browser ;(
I have rebuilt the serialization and use shared preference now it's working in android and browser
I'm trying to add persistence to my store there is no example I have used this repo it implement the persistence
https://github.com/glassp/flutter_news/tree/5c1d13c600ef986d5640c2a127ca695411bcf56b
but when trying to read the state I get this error
_TypeError (type '_Directory' is not a subtype of type 'Directory')
and I have another question does the persistence work in browsers ?
thanks in advance