pref_dessert library

Classes

DesSer<T>
Abstract class for deserialization and serialization which you have to implement and then pass it to the PreferencesRepository
FuturePreferencesRepository<T>
Repository class that takes DesSer<T> and allows you to save and read your objects.
FutureSingleElementPreferencesRepository<T>
Repository class that takes DesSer<T> and allows you to save and read your objects. This is simplified version of FuturePreferencesRepository which only stores one value.
JsonDesSer<T>
If you want to store your classes as JSON (which is recommended), use this class and only provide implementation of two methods which converts your objects from and to map.
PreferencesRepository<T>
PreferencesRepository that takes SharedPreferences directly. Be aware that SharedPreferences.getInstance() returns Future so you have to wait for that to complete (eg. during your app startup) to be able to use this class! If you don't want to do this, just use FuturePreferencesRepository
SingleElementPreferencesRepository<T>
SingleElementPreferencesRepository that takes SharedPreferences directly. Be aware that SharedPreferences.getInstance() returns Future so you have to wait for that to complete (eg. during your app startup) to be able to use this class! If you don't want to do this, just use FutureSingleElementPreferencesRepository This is simplified version of PreferencesRepository which only stores one value.