Package-level declarations

Types

Link copied to clipboard

Selects the stack keys that participate in the next animation cycle.

Link copied to clipboard
abstract class BaseCapabilityDispatcher<T : Any>(val capabilityType: KClass<T>, cycleController: StackCycleController) : CapabilityDispatcher
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A scoped registration for an animation that participates in stack item retention.

Link copied to clipboard
fun interface RenderOrderStrategy<Key : Any>

Orders active keys from back to front for rendering and must return every active key exactly once.

Link copied to clipboard
Link copied to clipboard
data class StackCreationContext<ItemType>(val stackSnapshot: List<ItemType>, val previousSnapshot: List<ItemType>? = null, val intention: AppearanceIntention)
Link copied to clipboard
Link copied to clipboard

Snapshot history and coordination of the two-phase context transition for a given cycle

Link copied to clipboard
class StackHistory<ItemType, Key : Any>(keyFor: (ItemType) -> Key)
Link copied to clipboard
sealed interface StackItemPosition
Link copied to clipboard

Selects the stack keys whose external transitions participate in render retention.

Properties

Link copied to clipboard
Link copied to clipboard

Nested stack animators inherit this scope to coordinate enter/exit transitions.

Link copied to clipboard

Whether the current stack item and all of its enclosing stack items participate in their visibility transitions. Content remains composed when this is false.

Functions

Link copied to clipboard
inline fun <D : CapabilityDispatcher> StackAnimatorState<*, *, *>.getOrCreateDispatcher(noinline factory: (StackCycleController) -> D): D
Link copied to clipboard
Link copied to clipboard
fun <ItemType, Key : Any, Context, CreationContext> rememberStackAnimatorState(stack: State<List<ItemType>>, factory: ItemAnimationFactory<ItemType, Key, Context>, resolver: ContextResolver<ItemType, Key, Context, CreationContext>, affectedItemsPolicy: AffectedItemsPolicy<ItemType, Key, Context> = remember { AffectedItemsPolicy.fromTop() }, maxAffected: Int = Int.MAX_VALUE, scope: CoroutineScope = rememberCoroutineScope(), renderOrder: RenderOrderStrategy<Key> = remember { RenderOrderStrategy.insertionOrder() }): StackAnimatorState<ItemType, Key, Context>
@JvmName(name = "rememberStackAnimatorStateStackItemContext")
fun <ItemType, Key : Any> rememberStackAnimatorState(stack: State<List<ItemType>>, keyFor: (ItemType) -> Key, factory: ItemAnimationFactory<ItemType, Key, StackItemPosition>, affectedItemsPolicy: AffectedItemsPolicy<ItemType, Key, StackItemPosition> = remember { AffectedItemsPolicy.fromTop() }, maxAffected: Int = Int.MAX_VALUE, scope: CoroutineScope = rememberCoroutineScope(), renderOrder: RenderOrderStrategy<Key> = remember { RenderOrderStrategy.insertionOrder() }): StackAnimatorState<ItemType, Key, StackItemPosition>
fun <ItemType, Key : Any, Context> rememberStackAnimatorState(stack: State<List<ItemType>>, keyFor: (ItemType) -> Key, factory: ItemAnimationFactory<ItemType, Key, Context>, contextFactory: ContextFactory<ItemType, Context, StackCreationContext<ItemType>>, affectedItemsPolicy: AffectedItemsPolicy<ItemType, Key, Context> = remember { AffectedItemsPolicy.fromTop() }, maxAffected: Int = Int.MAX_VALUE, scope: CoroutineScope = rememberCoroutineScope(), renderOrder: RenderOrderStrategy<Key> = remember { RenderOrderStrategy.insertionOrder() }): StackAnimatorState<ItemType, Key, Context>
Link copied to clipboard
fun <ItemType : Any, Key : Any, Context> StackAnimatorLayout(animator: StackAnimatorState<ItemType, Key, Context>, modifier: Modifier = Modifier, retentionPolicy: StackTransitionRetentionPolicy<Key> = StackTransitionRetentionPolicy.adjacent(), parentAnimatedVisibilityScope: AnimatedVisibilityScope? = LocalStackAnimatedVisibilityScope.current, content: @Composable AnimatedVisibilityScope.(Key, ItemType) -> Unit)

Renders stack items with an AnimatedVisibilityScope derived from the topmost stack item.

fun <ItemType, Key : Any, Context> StackAnimatorLayout(animator: StackAnimatorState<ItemType, Key, Context>, transition: Transition<Key?>, parentAnimatedVisibilityScope: AnimatedVisibilityScope?, modifier: Modifier = Modifier, retainWhileTransitionRunning: (Key, ItemType) -> Boolean = { _, _ -> true }, content: @Composable AnimatedVisibilityScope.(Key, ItemType) -> Unit)

Renders stack items with an AnimatedVisibilityScope derived from transition.