How do you create a deprecated Text in flutter?

Viewed 69

enter image description here

I want to create a deprecated text as shown next to the price of Rs.28499 . How do I do that?

3 Answers

Try below code: refer decorationThickness

Text(
      'Rs.234554',
      style: TextStyle(
        decoration: TextDecoration.lineThrough,
      ),
    ),

Result-> enter image description here

The property name that you're searching is the lineThrough.

You can update the style property of your Text widget and add the following:

TextStyle(decoration: TextDecoration.lineThrough)

Like this:

Text(
  'Your text',
  style: TextStyle(
    decoration: TextDecoration.lineThrough,
  ),
)
Related