So i am working with an app in jetpack compose and i see this tutorial Tutorial. This tutorial builds a default snackbar within a snackbarhost and adds a text to this snackbar in the way below. Though when i try to add this parameter it tells me that it doesn't exist. Why is this is the parameter deprecated and if so what did it get exchanged with? Plus i have the question of how to clear the que in the snackbarhost quz when i click more then once i first get myh last message and then the one i should get?
Snackbar(
modifier = Modifier.padding(16.dp),
text = {
Text(
text = data.message,
style = MaterialTheme.typography.body2,
color = Color.White
)
},
action = {
data.actionLabel?.let { actionLabel ->
TextButton(
onClick = {
onDismiss()
}
) {
Text(
text = actionLabel,
style = MaterialTheme.typography.body2,
color = Color.White
)
}
}
}
)