Skip to content

Instantly share code, notes, and snippets.

@merttoptas
Created February 26, 2022 15:16
Show Gist options
  • Save merttoptas/327507b31f859570ce460c72c10f4419 to your computer and use it in GitHub Desktop.
Save merttoptas/327507b31f859570ce460c72c10f4419 to your computer and use it in GitHub Desktop.
@Composable
fun BloomText(
modifier: Modifier,
text: String,
color: Color = MaterialTheme.colors.secondaryVariant,
fontSize: TextUnit = TextUnit.Unspecified,
letterSpacing: TextUnit = TextUnit.Unspecified,
textAlign: TextAlign? = null,
style: TextStyle = MaterialTheme.typography.subtitle2,
lineHeight: TextUnit = TextUnit.Unspecified,
maxLines: Int = Int.MAX_VALUE,
overflow: TextOverflow = TextOverflow.Clip
) {
Text(
text = AnnotatedString(text),
modifier = modifier,
color = color,
fontSize = fontSize,
letterSpacing = letterSpacing,
textAlign = textAlign,
style = style,
lineHeight = lineHeight,
maxLines = maxLines,
overflow = overflow
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment