Skip to content

Instantly share code, notes, and snippets.

@linean
Created May 10, 2022 19:52
Show Gist options
  • Save linean/2b77d7ae8b4c8a3b9907733591dafb0f to your computer and use it in GitHub Desktop.
Save linean/2b77d7ae8b4c8a3b9907733591dafb0f to your computer and use it in GitHub Desktop.
val gridOffsets = remember(columns, rows, itemSize) {
(0 until columns).map { column ->
(0 until rows).map { row ->
DpOffset(
x = itemSize.width * row,
y = itemSize.height * column,
)
}
}.flatten()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment