rememberNestedScrollAwareVisibilityState

Creates a VisibilityState.NestedScrollAware for a nested-scrolling container.

Apply the returned state's nestedScrollConnection to the scrolling parent:

val visibility = rememberNestedScrollAwareVisibilityState()
LazyColumn(Modifier.nestedScroll(visibility.nestedScrollConnection)) { /* ... */}
StylishFab(onClick = {}, visibilityState = visibility) { /* ... */}

Parameters

threshold

Distance of continuous scrolling in one direction before visibility changes.

initiallyVisible

Initial visibility before any scroll gesture is observed.