androidx.compose.material3.pulltorefresh

PullToRefreshDefaults

Object

No hand-written docs yet.

Contains the default values for PullToRefreshBox

object PullToRefreshDefaults

Properties

indicatorShapeSince 1.9

val indicatorShape: Shape

The default shape for Indicator

indicatorContainerColorSince 1.9

@Composable val indicatorContainerColor: Color

The default container color for Indicator

loadingIndicatorContainerColorSince 1.10Experimental

@Composable val loadingIndicatorContainerColor: Color

The default container color for the loading indicator that appears when pulling to refresh.

indicatorColor

@Composable val indicatorColor: Color

The default indicator color for Indicator

loadingIndicatorColorSince 1.10Experimental

@Composable val loadingIndicatorColor: Color

The default active indicator color for the loading indicator that appears when pulling to refresh.

PositionalThreshold

val PositionalThreshold: Dp

The default refresh threshold for rememberPullToRefreshState

IndicatorMaxDistanceSince 1.9

val IndicatorMaxDistance

The default maximum distance Indicator, IndicatorBox and LoadingIndicator can be pulled before a refresh is triggered.

Elevation

val Elevation: Dp

The default elevation for an IndicatorBox that is applied to an Indicator

LoadingIndicatorElevationSince 1.9

val LoadingIndicatorElevation: Dp

The default elevation for an IndicatorBox that is applied to a LoadingIndicator

Functions

IndicatorBoxSince 1.9

@Composable
fun IndicatorBox(
    state: PullToRefreshState,
    isRefreshing: Boolean,
    modifier: Modifier = Modifier,
    maxDistance: Dp = IndicatorMaxDistance,
    shape: Shape = indicatorShape,
    containerColor: Color = Color.Unspecified,
    elevation: Dp = Elevation,
    content: @Composable BoxScope.() -> Unit,
)

A Wrapper that handles the size, offset, clipping, shadow, and background drawing for a pull-to-refresh indicator, useful when implementing custom indicators. PullToRefreshDefaults.Indicator uses this as the container.

Indicator

@Composable
fun Indicator(
    state: PullToRefreshState,
    isRefreshing: Boolean,
    modifier: Modifier = Modifier,
    containerColor: Color = this.indicatorContainerColor,
    color: Color = this.indicatorColor,
    maxDistance: Dp = IndicatorMaxDistance,
)

The default indicator for PullToRefreshBox.

LoadingIndicatorSince 1.10Experimental

@Composable
fun LoadingIndicator(
    state: PullToRefreshState,
    isRefreshing: Boolean,
    modifier: Modifier = Modifier,
    containerColor: Color = this.loadingIndicatorContainerColor,
    color: Color = this.loadingIndicatorColor,
    elevation: Dp = LoadingIndicatorElevation,
    maxDistance: Dp = IndicatorMaxDistance,
)

A LoadingIndicator indicator for PullToRefreshBox.

Library docs

Contains the default values for PullToRefreshBox