I try to set the background color for the Material3 Card in Android Jetpack Compose, using the backgroundColor parameter.
implementation 'androidx.compose.material3:material3:1.0.0-alpha14'
// * Card with background color argument
Card(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
//set background color of the card
backgroundColor = Color.Gray,
content = {
Text("Card with background color argument", modifier = Modifier.padding(16.dp),style = MaterialTheme.typography.labelLarge)
}
)
i got error message : Cannot find a parameter with this name: backgroundColor