Package-level declarations

Types

Link copied to clipboard
actual interface CircuitSaveable

A Circuit value whose persisted representation is handled by a CircuitSaver.

expect sealed interface CircuitSaveable

A Circuit value whose persisted representation is handled by a CircuitSaver.

actual interface CircuitSaveable

A Circuit value whose persisted representation is handled by a CircuitSaver.

actual interface CircuitSaveable

A Circuit value whose persisted representation is handled by a CircuitSaver.

actual interface CircuitSaveable

A Circuit value whose persisted representation is handled by a CircuitSaver.

Link copied to clipboard
abstract class CircuitSaver

Converts Screens and PopResults to and from representations that can be stored in a Compose SaveableStateRegistry.

Link copied to clipboard
@RequiresOptIn(level = RequiresOptIn.Level.ERROR, message = "This is an internal Circuit saver API. It may change without warning and should not be used outside Circuit's first-party artifacts.")
annotation class InternalCircuitSaverApi

Marks internal Circuit saver APIs that may change without warning or migration support.

Link copied to clipboard

A PopResult that is also android.os.Parcelable on Android.

A PopResult that is also android.os.Parcelable on Android.

A PopResult that is also android.os.Parcelable on Android.

A PopResult that is also android.os.Parcelable on Android.

A PopResult that is also android.os.Parcelable on Android.

Link copied to clipboard

A Screen that is also android.os.Parcelable on Android.

expect interface ParcelableScreen : Screen

A Screen that is also android.os.Parcelable on Android.

actual interface ParcelableScreen : Screen

A Screen that is also android.os.Parcelable on Android.

actual interface ParcelableScreen : Screen

A Screen that is also android.os.Parcelable on Android.

actual interface ParcelableScreen : Screen

A Screen that is also android.os.Parcelable on Android.

Link copied to clipboard

A result returned while calling Navigator.pop().

A result returned while calling Navigator.pop().

A result returned while calling Navigator.pop().

A result returned while calling Navigator.pop().

A result returned while calling Navigator.pop().

Link copied to clipboard
actual interface Screen : CircuitSaveable

Represents an individual screen, used as a key for Presenter.Factory and Ui.Factory.

expect interface Screen : CircuitSaveable

Represents an individual screen, used as a key for Presenter.Factory and Ui.Factory.

actual interface Screen : CircuitSaveable

Represents an individual screen, used as a key for Presenter.Factory and Ui.Factory.

actual interface Screen : CircuitSaveable

Represents an individual screen, used as a key for Presenter.Factory and Ui.Factory.

actual interface Screen : CircuitSaveable

Represents an individual screen, used as a key for Presenter.Factory and Ui.Factory.

Link copied to clipboard
actual interface StaticScreen : Screen

A marker interface that indicates that this Screen only ever has static content and does not require a presenter to compute or manage its state. This is useful for UIs that either have no state or can derive their state solely from static inputs or the Screen key itself.

expect interface StaticScreen : Screen

A marker interface that indicates that this Screen only ever has static content and does not require a presenter to compute or manage its state. This is useful for UIs that either have no state or can derive their state solely from static inputs or the Screen key itself.

actual interface StaticScreen : Screen

A marker interface that indicates that this Screen only ever has static content and does not require a presenter to compute or manage its state. This is useful for UIs that either have no state or can derive their state solely from static inputs or the Screen key itself.

actual interface StaticScreen : Screen

A marker interface that indicates that this Screen only ever has static content and does not require a presenter to compute or manage its state. This is useful for UIs that either have no state or can derive their state solely from static inputs or the Screen key itself.

actual interface StaticScreen : Screen

A marker interface that indicates that this Screen only ever has static content and does not require a presenter to compute or manage its state. This is useful for UIs that either have no state or can derive their state solely from static inputs or the Screen key itself.

Properties

Link copied to clipboard

The default CircuitSaver used by Circuit's saveable back stacks and result handlers.

Functions

Link copied to clipboard

Returns the saver installed by ProvideCircuitSaver, or null when none is installed.

Link copied to clipboard

Returns a saver that tries this saver and then other.

Link copied to clipboard
Link copied to clipboard
inline fun <T : PopResult> CircuitSaver.restorePopResult(saved: Any, onAbsent: () -> Unit = {}, onTypeMismatch: (CircuitSaveable) -> Unit = { error("Expected ${T::class}, but CircuitSaver restored ${it::class}.") }): T?

Restores saved as a T.

Link copied to clipboard
inline fun <T : Screen> CircuitSaver.restoreScreen(saved: Any, onAbsent: () -> Unit = {}, onTypeMismatch: (CircuitSaveable) -> Unit = { error("Expected ${T::class}, but CircuitSaver restored ${it::class}.") }): T?

Restores saved as a T.