fun createListItem(itemIndex: Int) { Padding(left = 8.dp, right = 8.dp, top = 8.dp, bottom = 8.dp) { FlexRow(crossAxisAlignment = CrossAxisAlignment.Center) {
The way to do this has been updated. It's now:
val context = ContextAmbient.current
ContextAmbient docs