Create StrikeThrough Text in Flutter Android iOS Example

Hello friends, It’s been a whole month since I had posted a tutorial on website. Sorry for late posting tutorial guys. I have been a little busy on my flutter project at work. But now the project is completed and I’m free again. So today we would learn about a small thing in flutter known as StrikeThrough. StrikeThrough text is used to notify the user about changing a price tag and new discount is applied on text. In StrikeThrough text a horizontal line will be draw above the Text from middle of it. So in this tutorial we would learn about Create StrikeThrough Text in Flutter Android iOS Example.

Contents in this project Create StrikeThrough Text in Flutter Android iOS Example :-

1. Open your project’s main.dart file and import material.dart package in your project.

2. Creating void main runApp() method and here we would import our main class MyApp.

3. Creating our main class MyApp extends StatelessWidget.

4. Creating Widget Build area -> Material App -> Scaffold widget -> Center Widget -> Container widget .

5. Creating Text widget with style decoration TextDecoration.lineThrough to make the StrikeThrough text.

6. Complete source code for main.dart file :

Screenshot in Android device :

Create StrikeThrough Text in Flutter Android iOS Example

Screenshot in iOS device :

Create StrikeThrough Text in Flutter Android iOS Example

Leave a Reply

Your email address will not be published.