Skip to content

Instantly share code, notes, and snippets.

@catalinghita8
Created July 7, 2021 13:31
Show Gist options
  • Save catalinghita8/8711a9606cf1e27c0f8a72636f77d6ff to your computer and use it in GitHub Desktop.
Save catalinghita8/8711a9606cf1e27c0f8a72636f77d6ff to your computer and use it in GitHub Desktop.
@Composable
fun FoodCategoryDetailsScreen(state: FoodCategoryDetailsContract.State) {
val scrollState = rememberLazyListState()
val scrollOffset: Float = min(
1f,
1 - (scrollState.firstVisibleItemScrollOffset / 600f + scrollState.firstVisibleItemIndex)
)
Column {
CategoryDetailsCollapsingToolbar(state.category, scrollOffset)
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment