This is a simple Jetpack Compose demo project showcasing how to save and retrieve key-value pairs using Jetpack DataStore (Preferences). It provides a minimal UI where users can input a key and value, save it to the DataStore, and retrieve it later.
- Built with Jetpack Compose
- Uses Preferences DataStore for persistent storage
- Clean and intuitive UI
- Kotlin Coroutines for background operations
| Save to DataStore | Retrieve from DataStore |
|---|---|
![]() |
![]() |
- The user enters a key and value.
- On clicking Save, the data is stored using
DataStore. - On clicking Get Info, the stored value for the entered key is retrieved and displayed.
- 🧱 Jetpack Compose
- ⚙️ Kotlin Coroutines
- 💾 Jetpack DataStore (Preferences)
- 🎨 Material3 Design Components
@Composable
fun MainScreen(
preferencesDataStore: PreferencesDataStore
) {
// UI and state management to store/retrieve data
}

