runtime-saveable
Functions
  • SaveableStateRegistry
  • Saver
  • autoSaver
  • listSaver
  • mapSaver
Composable Functions
  • rememberSaveable
  • rememberSaveableStateHolder
  • rememberSerializable
Interfaces
  • SaveableStateHolder
  • SaveableStateRegistry
  • SaveableStateRegistry.Entry
  • Saver
  • SaverScope
Properties
  • LocalSaveableStateRegistry
Jetpack Compose / Compose Runtime / runtime-saveable / Functions / Saver
Function

Saver

View Markdown Open in ChatGPT Open in Claude

The Saver describes how the object of Original class can be simplified and converted into something which is Saveable.

CodeRabbit

CodeRabbit

AI writes the code. CodeRabbit catches the slop.

AdTry CodeRabbit for Free
Robomori

Robomori

Run Android emulators and devices outside Android Studio.

AdTry Robomori
API

Examples

CustomSaverSample

@Sampled
@Composable
fun CustomSaverSample() {
    data class Holder(var value: Int)

    // this Saver implementation converts Holder object which we don't know how to save
    // to Int which we can save
    val HolderSaver = Saver<Holder, Int>(save = { it.value }, restore = { Holder(it) })
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free →

Content updated: 2026-11-04

SaveableStateRegistry ← Previous autoSaver Next →

On this page

  • CustomSaverSample
Reach Android developers Put your product in front of engineers building Android and KMP apps. Sponsor Composables