Skip to content

Instantly share code, notes, and snippets.

@linean
Created May 10, 2022 19:54
Show Gist options
  • Save linean/70925286426b287334f155c658ae5d62 to your computer and use it in GitHub Desktop.
Save linean/70925286426b287334f155c658ae5d62 to your computer and use it in GitHub Desktop.
LaunchedEffect(itemKeys) {
items.forEachIndexed { index, item ->
val newOffset = gridOffsets[index]
val itemOffset = itemsOffsets.getValue(itemKey(item))
launch { itemOffset.animateTo(newOffset, animationSpec) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment