Fix: Items alignment when there's not enough elements to fill the screen

This commit is contained in:
machiav3lli 2022-03-04 03:41:30 +01:00
parent ef8ec5d159
commit 0ff3bc25d1

View File

@ -84,7 +84,7 @@ fun <T> VerticalItemList(
modifier = modifier modifier = modifier
.fillMaxSize() .fillMaxSize()
.background(backgroundColor), .background(backgroundColor),
contentAlignment = Alignment.Center contentAlignment = if (list.isNullOrEmpty()) Alignment.Center else Alignment.TopStart
) { ) {
if (!list.isNullOrEmpty()) { if (!list.isNullOrEmpty()) {
LazyColumn(verticalArrangement = spacedBy(4.dp)) { LazyColumn(verticalArrangement = spacedBy(4.dp)) {