Cretezy / redux_persist

Persist Redux State
https://pub.dartlang.org/packages/redux_persist
MIT License
130 stars 41 forks source link

Decide which properties to place where? #47

Closed naiveai closed 5 years ago

naiveai commented 5 years ago

Is there a way to, using a transform or something, segregate different parts of app my app state into different boxes? Ie, some need to go into SharedPreferences, some need to go into appdir, some need to use a custom storage class, or whatever.

Cretezy commented 5 years ago

I don't think it really would support this, nor do I want to support this. It would drastically increase the complexity of the package if this was added. Maybe if you propose a good and simple implementation, it can be.

However, I would recommend writing your own if you need it to be very customized.

naiveai commented 5 years ago

@Cretezy Yeah, that does make sense, the only current block on my end is that the storage class can't really analyze the data and decide where to put things cause it gets a Uint8List. I don't think you should implement this into core, but I really would appreciate if you had some sort of workaround in transforms that allowed me to make decisions in my storage class somehow... obviously that still would actually increase complexity... you may be right about a custom solution. Sorry about that!