Long Tran
01/12/2023, 7:40 AMAbhishek Sharma
01/12/2023, 10:11 AMonChildPositioned
callback. Maybe something like
var childCount = 0
LazyVerticalGrid(columns = GridCells.Fixed(x)) {
items((1..100).toList()) {
Text("Item $it")
onChildPositioned {
childCount++
}
}
}
// Assert that the number of children positioned within the grid is equal to x
assertEquals(x, childCount)
Btw, you might need to use the runBlockingTest
as onChildPositioned is async.Zach Klippenstein (he/him) [MOD]
01/12/2023, 2:31 PM