MotionDurationScale

Provides a duration scale for motion such as animations. When the duration scaleFactor is 0, the motion will end in the next frame callback. Otherwise, the duration scaleFactor will be used as a multiplier to scale the duration of the motion. The larger the scale, the longer the motion will take to finish, and therefore the slower it will be perceived.

Testing

To control the motion duration scale in tests, create an implementation of this interface and pass it to the effectContext parameter either where you call runComposeUiTest or where you create your test rule.

Types

Link copied to clipboard

Properties

Link copied to clipboard
open override val key: CoroutineContext.Key<*>
Link copied to clipboard
abstract val scaleFactor: Float

Defines the multiplier for the duration of the motion. This value should be non-negative.

Functions

Link copied to clipboard
open override fun <R> fold(initial: R, operation: (R, CoroutineContext.Element) -> R): R
Link copied to clipboard
open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext