PullToRefreshDefaults


Contains the default values for PullToRefreshBox

Summary

Public functions

Unit
@Composable
Indicator(
    state: PullToRefreshState,
    isRefreshing: Boolean,
    modifier: Modifier,
    containerColor: Color,
    color: Color,
    threshold: Dp
)

The default indicator for PullToRefreshBox.

Cmn
Unit
@Composable
IndicatorBox(
    state: PullToRefreshState,
    isRefreshing: Boolean,
    modifier: Modifier,
    threshold: Dp,
    shape: Shape,
    containerColor: Color,
    elevation: Dp,
    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.

Cmn
Unit
@ExperimentalMaterial3ExpressiveApi
@Composable
LoadingIndicator(
    state: PullToRefreshState,
    isRefreshing: Boolean,
    modifier: Modifier,
    containerColor: Color,
    color: Color,
    elevation: Dp,
    threshold: Dp
)

A LoadingIndicator indicator for PullToRefreshBox.

Cmn

Public properties

Dp

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

Cmn
Dp

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

Cmn
Dp

The default refresh threshold for rememberPullToRefreshState

Cmn
Color

This property is deprecated. Use loadingIndicatorContainerColor instead

Cmn
Color

This property is deprecated. Use loadingIndicatorColor instead

Cmn
Color

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

Cmn
Color

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

Cmn
Shape

The default shape for Indicator

Cmn

Public functions

Indicator

@Composable
fun Indicator(
    state: PullToRefreshState,
    isRefreshing: Boolean,
    modifier: Modifier = Modifier,
    containerColor: Color = this.containerColor,
    color: Color = this.indicatorColor,
    threshold: Dp = PositionalThreshold
): Unit

The default indicator for PullToRefreshBox.

Parameters
state: PullToRefreshState

the state of this modifier, will use state.distanceFraction and threshold to calculate the offset

isRefreshing: Boolean

whether a refresh is occurring

modifier: Modifier = Modifier

the modifier applied to this layout

containerColor: Color = this.containerColor

the container color of this indicator

color: Color = this.indicatorColor

the color of this indicator

threshold: Dp = PositionalThreshold

how much the indicator can be pulled down before a refresh is triggered on release

IndicatorBox

@Composable
fun IndicatorBox(
    state: PullToRefreshState,
    isRefreshing: Boolean,
    modifier: Modifier = Modifier,
    threshold: Dp = PositionalThreshold,
    shape: Shape = PullToRefreshDefaults.shape,
    containerColor: Color = Color.Unspecified,
    elevation: Dp = Elevation,
    content: @Composable BoxScope.() -> Unit
): 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.

Parameters
state: PullToRefreshState

the state of this modifier, will use state.distanceFraction and threshold to calculate the offset

isRefreshing: Boolean

whether a refresh is occurring

modifier: Modifier = Modifier

the modifier applied to this layout

threshold: Dp = PositionalThreshold

how much the indicator can be pulled down before a refresh is triggered on release

shape: Shape = PullToRefreshDefaults.shape

the Shape of this indicator

containerColor: Color = Color.Unspecified

the container color of this indicator

elevation: Dp = Elevation

the elevation for the indicator

content: @Composable BoxScope.() -> Unit

content for this IndicatorBox

LoadingIndicator

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

A LoadingIndicator indicator for PullToRefreshBox.

Parameters
state: PullToRefreshState

the state of this modifier, will use state.distanceFraction and threshold to calculate the offset

isRefreshing: Boolean

whether a refresh is occurring

modifier: Modifier = Modifier

the modifier applied to this layout

containerColor: Color = this.loadingIndicatorContainerColor

the container color of this indicator

color: Color = this.loadingIndicatorColor

the color of this indicator

elevation: Dp = LoadingIndicatorElevation

the elevation of this indicator

threshold: Dp = PositionalThreshold

how much the indicator can be pulled down before a refresh is triggered on

Public properties

Elevation

val ElevationDp

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

LoadingIndicatorElevation

val LoadingIndicatorElevationDp

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

PositionalThreshold

val PositionalThresholdDp

The default refresh threshold for rememberPullToRefreshState

containerColor

val containerColorColor

The default container color for Indicator

indicatorColor

val indicatorColorColor

The default indicator color for Indicator

loadingIndicatorColor

@ExperimentalMaterial3ExpressiveApi
val loadingIndicatorColorColor

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

loadingIndicatorContainerColor

@ExperimentalMaterial3ExpressiveApi
val loadingIndicatorContainerColorColor

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

shape

val shapeShape

The default shape for Indicator