Package-level declarations
Types
Writable saved property with a fallback applied only to reads and observation. Assignments are saved normally; reading a fallback never writes it to the handle. Created by StateValue.Companion.required or StateValue.Companion.default.
Lazily creates one holder using the ViewModel scope and the property name when no key is given.
Serialized property delegate. Bind a property or supply a key before calling flow.
Screen state stored as JSON in the supplied SavedStateHandle. Call APIs on the main thread, using a main-thread scope. Restoration guarantees are those of the handle's owner. Keep payloads small and replace collections instead of mutating them in place.
Functions
Creates result state as a ViewModel property, for example val users by handle.saveResponseState<List<User>>().
Creates plain saved state as a ViewModel property, for example val users by handle.saveState<List<User>>().
Computes an expensive projection on workerDispatcher, retaining its last completed value. Reading the returned StateFlow never invokes transform. New input cancels the old computation. Projection publication and output equality also run on the worker, using the same parent Job. scope controls observation; initialValue is visible until the first computation completes. Unlike select, this projection updates asynchronously. Keep inputs immutable. On JS/Wasm, a dispatcher does not provide a background thread: expensive work must cooperate with the event loop or use an application-provided worker implementation.
Creates a saved property for use in common code, with no ViewModel requirement.