Skip to content

Instantly share code, notes, and snippets.

@catalinghita8
Created July 7, 2021 13:48
Show Gist options
  • Save catalinghita8/91d5c9a717f53b9f33644cb716d2599a to your computer and use it in GitHub Desktop.
Save catalinghita8/91d5c9a717f53b9f33644cb716d2599a to your computer and use it in GitHub Desktop.
@Composable
private fun CategoryDetailsCollapsingToolbar(category: FoodItem?, scrollOffset: Float) {
val imageSize by animateDpAsState(targetValue = max(72.dp, 128.dp * scrollOffset))
val dynamicLines = max(3f, scrollOffset * 6).toInt()
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment