KMP Tutorial #8: DataStore — Key-Value Storage in Kotlin Multiplatform
In the previous tutorial, we used SQLDelight for structured data — tables with rows and columns. But not everything belongs in a database. Simple settings like “dark mode on/off”, “last selected tab”, or “auth token” need something lighter. That is what DataStore does. It is Google’s replacement for SharedPreferences, and it works on Android, iOS, and Desktop through KMP. What is DataStore? DataStore is a key-value storage library. Think of it like a dictionary: ...