<div class='type'>Compose Modifier</div>

<a id='references'></a>


<h2 id="pullrefreshindicatortransform-state-scale">pullRefreshIndicatorTransform</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@ExperimentalMaterialApi
fun Modifier.pullRefreshIndicatorTransform(state: PullRefreshState, scale: Boolean = false) =
    drawWithContent {
            clipRect(
                top = 0f,
                left = -Float.MAX_VALUE,
                right = Float.MAX_VALUE,
                bottom = Float.MAX_VALUE,
            ) {
                this@drawWithContent.drawContent()
            }
        }
        .graphicsLayer {
            translationY = state.position - size.height

            if (scale && !state.refreshing) {
                val scaleFraction =
                    LinearOutSlowInEasing.transform(state.position / state.threshold)
                        .fastCoerceIn(0f, 1f)
                scaleX = scaleFraction
                scaleY = scaleFraction
            }
        }
```


A modifier for translating the position and scaling the size of a pull-to-refresh indicator based
on the given `PullRefreshState`.

#### Parameters

| | |
| --- | --- |
| state | The `PullRefreshState` which determines the position of the indicator. |
| scale | A boolean controlling whether the indicator's size scales with pull progress or not. |