pullToRefreshIndicator
Common
Modifier in Material 3 Compose
A Modifier that handles the size, offset, clipping, shadow, and background drawing of a pull-to-refresh indicator, useful when implementing custom indicators. [PullToRefreshDefaults.Indicator] applies this automatically.
Last updated:
Installation
dependencies {
implementation("androidx.compose.material3:material3:1.3.0")
}
Overloads
@ExperimentalMaterial3Api
fun Modifier.pullToRefreshIndicator(
state: PullToRefreshState,
isRefreshing: Boolean,
threshold: Dp = PullToRefreshDefaults.PositionalThreshold,
shape: Shape = PullToRefreshDefaults.shape,
containerColor: Color = Color.Unspecified,
elevation: Dp = PullToRefreshDefaults.Elevation,
): Modifier
Parameters
name | description |
---|---|
state | the state of this modifier, will use state.distanceFraction and [threshold] to calculate the offset |
isRefreshing | whether a refresh is occurring |
threshold | how much the indicator can be pulled down before a refresh is triggered on release |
shape | the [Shape] of this indicator |
containerColor | the container color of this indicator |
elevation | the elevation for the indicator |