Scroll Aware
The element's visibility is determined by the scroll position of a ScrollState.
The element is visible when the scroll offset is less than threshold (i.e., near the top of the scrollable content), and hidden when the scroll offset exceeds the threshold. This is commonly used to hide headers or footers when the user scrolls down and show them when the user scrolls back up.
Parameters
scroll State
The ScrollState to observe for scroll position changes.
threshold
The scroll offset (in dp) below which the element is visible. Defaults to 48.dp. When the scroll position exceeds this value, the element is hidden.
Functions
Link copied to clipboard
Returns the current visibility state as a boolean, observing any reactive sources (such as VisibilityState.ScrollAware.scrollState) as needed.