Skip to content

Preference via delegates (Flow, Coroutines) + JetPack DataStore Storage

License

Notifications You must be signed in to change notification settings

MFlisar/KotPreferences

Repository files navigation

Maven API Kotlin KMP License

KotPreferences

A kotlin delegates based preference library.

✔️ Features

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!

📷 Screenshots

--

🔗 Dependencies

Dependency Version Infos
Compose Multiplatform 1.7.0 based on compose 1.7.1 and material3 1.3.0

🐘 Gradle

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")

⚡ Modules