A kotlin delegates based preference library.
With this library you can declare preferences via kotlin delegates and observe and update them via kotlin flows. This works with any storage implementation, an implementation for JetPack DataStore is provided already.
Additionally there's also an extension to easily integrate this library into your compose app.
All features are splitted into separate modules, just include the modules you want to use!
--
Dependency | Version | Infos |
---|---|---|
Compose Multiplatform | 1.7.0 |
based on compose 1.7.1 and material3 1.3.0 |
This library is distributed via maven central.
build.gradle.kts
val kotpreferences = "<LATEST-VERSION>"
// core
implementation("io.github.mflisar.kotpreferences:core:$kotpreferences")
// storage modules
implementation("io.github.mflisar.kotpreferences:storage-datastore:$kotpreferences")
implementation("io.github.mflisar.kotpreferences:storage-keyvalue:$kotpreferences")
// encryption modules
implementation("io.github.mflisar.kotpreferences:encryption-aes:$kotpreferences")
// extension modules
implementation("io.github.mflisar.kotpreferences:extension-compose:$kotpreferences")