I am using LazyColumn in project. When I am passing the list it giving me error. Can someone guide me what is the error?
@Composable
fun ResultScreen(nearestResultList: List<NearestResult>?) {
LazyColumn(
Modifier
.fillMaxSize()
.background(getBackgroundColor())
) {
items(nearestResultList) { nearestResult ->
Text(text = "$nearestResult")
}
}
}
Error
Type mismatch.
Required:
Int
Found:
List<NearestResult>?
UPDATE