Jetpack Compose Text Gradient Background With Shodow Text

Text(    modifier = Modifier.align(Alignment.BottomStart).background(        brush = Brush.verticalGradient(            colors = listOf(                Color.White.copy(alpha = 0.0f),                Color.Black.copy(alpha = 0.9f)            )        )    ).padding(4.dp, 10.dp, 4.dp, 4.dp).fillMaxWidth(),    style = MaterialTheme.typography.body1.copy(        shadow = Shadow(            color = Color.DarkGray,            offset = Offset(2f, 2f),            blurRadius = 1.5f        )    ),    color = Color.White,    maxLines = 1,    overflow = TextOverflow.Ellipsis,    text = "Hello World",)

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.