Is there a nicer way of underlining a "subtitle2" ...
# compose
z
Is there a nicer way of underlining a "subtitle2" other than
Copy code
.subtitle2.merge(TextStyle(textDecoration = TextDecoration.Underline))
full code:
Copy code
Text(
  text = action.text,
  modifier = Modifier
    .clickable { safeAction.onClick },
  style = MaterialTheme.typography.subtitle2
    .merge(TextStyle(textDecoration = TextDecoration.Underline))
)
b
Text
has a
textDecoration
property you can set directly
Copy code
Text(
  text = action.text,
  modifier = Modifier
    .clickable { safeAction.onClick },
  style = MaterialTheme.typography.subtitle2,
  textDecoration = TextDecoration.Underline
)
z
Thank you!