Object

PickerDefaults

Contains the default values used by Picker

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
public object PickerDefaults

Contains the default values used by Picker

Functions

scalingParams

public fun scalingParams(
        edgeScale: Float = 0.45f,
        edgeAlpha: Float = 1.0f,
        minElementHeight: Float = 0.0f,
        maxElementHeight: Float = 0.0f,
        minTransitionArea: Float = 0.45f,
        maxTransitionArea: Float = 0.45f,
        scaleInterpolator: Easing = CubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f),
        viewportVerticalOffsetResolver: (Constraints) -> Int = { (it.maxHeight / 5f).toInt() },
    ): androidx.wear.compose.material.ScalingParams

Scaling params are used to determine when items start to be scaled down and alpha applied, and how much. For details, see ScalingParams


defaultScalingParams

public fun defaultScalingParams(
        edgeScale: Float = 0.45f,
        edgeAlpha: Float = 1.0f,
        minElementHeight: Float = 0.0f,
        maxElementHeight: Float = 0.0f,
        minTransitionArea: Float = 0.45f,
        maxTransitionArea: Float = 0.45f,
        scaleInterpolator: Easing = CubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f),
        viewportVerticalOffsetResolver: (Constraints) -> Int = { (it.maxHeight / 5f).toInt() },
    ): ScalingParams

Scaling params are used to determine when items start to be scaled down and alpha applied, and how much. For details, see ScalingParams


flingBehavior

@Composable
public fun flingBehavior(
    state: PickerState,
    decay: DecayAnimationSpec<Float> = exponentialDecay(),
): FlingBehavior

Create and remember a FlingBehavior that will represent natural fling curve with snap to central item as the fling decays.

Parameters

state the state of the Picker
decay the decay to use