The best type-safe wrapper over SharedPreferences. ⭐ Why so? -> strongly typed cards for access to storage -> don't think about type, use get|set -> can work with nullable values -> callback based updates
There are probably options here to simplify and improve the user experience. We could throw something like a list of cards (?) and get a list from the lists.., on the other hand even if we make some kind of implementation with a single detacher method, we are already approaching a better result.
Implementing
attachAll
will make it easier to compose large models from different cards. Let's say there is such a model:and this type of
attach
ment:Not that it looks bad at all, but it seems like there are options for optimizations. Need elaboration.
And a more complex case, based on a non-immutable model with late fields:
There are probably options here to simplify and improve the user experience. We could throw something like a list of cards (?) and get a list from the lists.., on the other hand even if we make some kind of implementation with a single
detacher
method, we are already approaching a better result.