Skip to content

Maven API Kotlin License

KotPreferences

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.

Features#

  • declare preferences via kotlin delegates
  • listen to updates from preferences via kotlin flows
  • update dependencies via suspend functions
  • use those preferences inside compose as MutableState

Supported Platforms#

This is a KMP (kotlin multiplatform) library and the provided modules do support following platforms.

Module Android iOS JVM Info
Core
core
Storage
storage-datastore
storage-keyvalue
Extensions
extension-compose
Encryption
encryption-aes - - (1)
  • (1) Currently I only provide an encryption module for android. Pull requests with implementations for other platforms are welcome.

🧬 Demo#

A full demo is included inside the demo module, it shows nearly every usage with working examples.