mattinger
03/29/2022, 5:23 PMmattinger
03/29/2022, 5:23 PM@Composable
fun CLScrollHintScaffold(
modifier: Modifier = Modifier,
hint: String,
onHintClicked: (ScrollState) -> Unit,
scrollState: ScrollState = rememberScrollState(),
content: @Composable (PaddingValues) -> Unit
) {
val isNotFullyScrolled = scrollState.value < scrollState.maxValue
Scaffold(
modifier = modifier,
floatingActionButton = {
if (isNotFullyScrolled) {
CLHint(
hint = hint,
iconType = CLIconType.HintScrollDown,
onClick = {
onHintClicked(scrollState)
}
)
}
},
floatingActionButtonPosition = FabPosition.Center
) {
content(it)
}
}
mattinger
03/29/2022, 5:25 PM