Home > OS >  How do you create a deprecated Text in flutter?
How do you create a deprecated Text in flutter?

Time:03-31

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?

CodePudding user response:

Try below code: refer enter image description here

CodePudding user response:

Like this:

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

CodePudding user response:

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)
  • Related