Reputation: 1336
I copied the below code from BrushExampleSnippet.kt but the compiler gives an error that it can't find brush
, I double checked import but it's correct as import androidx.compose.ui.text.TextStyle
.
// Use ImageShader Brush with TextStyle
Text(
text = "Hello Android!",
style = TextStyle(
brush = imageBrush, // here brush parameter is not found.
fontWeight = FontWeight.ExtraBold,
fontSize = 36.sp
)
)
Upvotes: 0
Views: 619