Package-level declarations

Types

Link copied to clipboard

DevView module that shows the state history of whichever screen is currently recording via TimeCapsuleEffect, and lets a developer restore any earlier state into it.

Link copied to clipboard
sealed interface TimeCapsuleDestination : NavKey

Navigation destinations owned by TimeCapsule.

Link copied to clipboard
interface TimeCapsuleOwner<S : Any>

Contract implemented by a screen's state holder (typically a ViewModel) so its state history can be recorded and restored by the TimeCapsule module.

Functions

Link copied to clipboard
fun <S : Any> TimeCapsuleEffect(owner: TimeCapsuleOwner<S>, label: (S) -> String = { it.toString() }, maxEntries: Int = TimeCapsule.DEFAULT_MAX_ENTRIES)

Records owner's state history for as long as this composable stays in composition, and exposes it to the TimeCapsule module for inspection and restore.

Link copied to clipboard
fun TimeCapsuleScreen(modifier: Modifier = Modifier, bottomPadding: Dp = 0.dp)

Screen showing the state history of whichever screen is currently recording via TimeCapsuleEffect, newest entry first, with a restore action on each row.