PagerDefaults

object PagerDefaults

Contains the default values used by HorizontalPager and VerticalPager.

Functions

flingBehavior
Link copied to clipboard
@Composable()
fun flingBehavior(state: PagerState, decayAnimationSpec: DecayAnimationSpec<Float> = rememberSplineBasedDecay(), snapAnimationSpec: AnimationSpec<Float> = SnapperFlingBehaviorDefaults.SpringAnimationSpec, endContentPadding: Dp = 0.dp): FlingBehavior
Remember the default FlingBehavior that represents the scroll curve.
@Composable()
fun flingBehavior(state: PagerState, decayAnimationSpec: DecayAnimationSpec<Float> = rememberSplineBasedDecay(), snapAnimationSpec: AnimationSpec<Float> = SnapperFlingBehaviorDefaults.SpringAnimationSpec, endContentPadding: Dp = 0.dp, snapIndex: (SnapperLayoutInfo, startIndex: Int, targetIndex: Int) -> Int): FlingBehavior
Remember the default FlingBehavior that represents the scroll curve.
@Composable()
fun flingBehavior(state: PagerState, decayAnimationSpec: DecayAnimationSpec<Float> = rememberSplineBasedDecay(), snapAnimationSpec: AnimationSpec<Float> = SnapperFlingBehaviorDefaults.SpringAnimationSpec, maximumFlingDistance: (SnapperLayoutInfo) -> Float = singlePageFlingDistance, endContentPadding: Dp = 0.dp): FlingBehavior
Remember the default FlingBehavior that represents the scroll curve.

Properties

singlePageFlingDistance
Link copied to clipboard
val singlePageFlingDistance: (SnapperLayoutInfo) -> Float
The default implementation for the maximumFlingDistance parameter of flingBehavior which limits the fling distance to a single page.
singlePageSnapIndex
Link copied to clipboard
val singlePageSnapIndex: (SnapperLayoutInfo, startIndex: Int, targetIndex: Int) -> Int
The default implementation for the snapIndex parameter of flingBehavior which limits the fling distance to a single page.