We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ceea08 commit 7e189d8Copy full SHA for 7e189d8
grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/SimpleGridCells.kt
@@ -168,7 +168,11 @@ interface SimpleGridCells {
168
val cellSizeWithSpacing = cellSize + spacing
169
170
return if (cellSizeWithSpacing < availableSizeWithSpacing) {
171
- val count = availableSizeWithSpacing / cellSizeWithSpacing
+ val count = if (cellSizeWithSpacing != 0) {
172
+ availableSizeWithSpacing / cellSizeWithSpacing
173
+ } else {
174
+ 1
175
+ }
176
return List(count) { cellSize }
177
} else {
178
List(1) { availableSize }
0 commit comments