ScrollableDefaults


Contains the default values used by scrollable

Summary

Public functions

FlingBehavior

Create and remember default FlingBehavior that will represent natural fling curve.

Cmn
OverscrollEffect

This function is deprecated. This API has been replaced with rememberOverscrollEffect, which queries theme provided OverscrollFactory values instead of the 'platform default' without customization.

Cmn
Boolean
reverseDirection(
    layoutDirection: LayoutDirection,
    orientation: Orientation,
    reverseScrolling: Boolean
)

Used to determine the value of reverseDirection parameter of Modifier.scrollable in scrollable layouts.

Cmn

Public functions

flingBehavior

@Composable
fun flingBehavior(): FlingBehavior

Create and remember default FlingBehavior that will represent natural fling curve.

overscrollEffect

@Composable
fun overscrollEffect(): OverscrollEffect

Returns a remembered OverscrollEffect created from the current value of LocalOverscrollFactory.

This API has been deprpecated, and replaced with rememberOverscrollEffect

reverseDirection

fun reverseDirection(
    layoutDirection: LayoutDirection,
    orientation: Orientation,
    reverseScrolling: Boolean
): Boolean

Used to determine the value of reverseDirection parameter of Modifier.scrollable in scrollable layouts.

Parameters
layoutDirection: LayoutDirection

current layout direction (e.g. from LocalLayoutDirection)

orientation: Orientation

orientation of scroll

reverseScrolling: Boolean

whether scrolling direction should be reversed

Returns
Boolean

true if scroll direction should be reversed, false otherwise.