PullRefreshState


A state object that can be used in conjunction with pullRefresh to add pull-to-refresh behaviour to a scroll component. Based on Android's SwipeRefreshLayout.

Provides progress, a float representing how far the user has pulled as a percentage of the refreshThreshold. Values of one or less indicate that the user has not yet pulled past the threshold. Values greater than one indicate how far past the threshold the user has pulled.

Can be used in conjunction with pullRefreshIndicatorTransform to implement Android-like pull-to-refresh behaviour with a custom indicator.

Should be created using rememberPullRefreshState.

Summary

Public properties

Float

A float representing how far the user has pulled as a percentage of the refreshThreshold.

Cmn

Public properties

progress

val progressFloat

A float representing how far the user has pulled as a percentage of the refreshThreshold.

If the component has not been pulled at all, progress is zero. If the pull has reached halfway to the threshold, progress is 0.5f. A value greater than 1 indicates that pull has gone beyond the refreshThreshold - e.g. a value of 2f indicates that the user has pulled to two times the refreshThreshold.