

LazyList에서는 item에서 fillmaxSize가 통하지 않습니다.

이유는 LazyList의 최대 너비와 높이가 Infinity이기 때문이죠.
그래서 LazyItemScope()에서 Modifier.FillParentMaxSize()가 존재합니다.

fillParentMaxSize를 통해 해결이 가능합니다.

@Composable
fun LazyItemScope.emptySearchScreen() = Box(
Modifier.fillParentMaxSize(),
) {
Column(Modifier.align(Alignment.Center)) {
Image(painter = painterResource(id = SearchEmpty), contentDescription = "")
Spacer(modifier = Modifier.height(40.dp))
Text(
modifier = Modifier.align(Alignment.CenterHorizontally),
text = "검색결과가 없습니다.\n" + "다른 검색어를 입력해보세요.",
textAlign = TextAlign.Center,
style = PollPollTheme.typography.body03,
)
}
}