Flutter Change StrikeThrough Text Line Color in Android iOS

Hey friends, In our previous tutorial we have discussed about creating StrikeThrough text in flutter, Current tutorial is one more step ahead. Today we would learn about styling or changing the StrikeThrough text line color in flutter in android iOS application. We would use the decorationColor styling prop to change the line through original color.

Contents in this project Flutter Change StrikeThrough Text Line Color in Android iOS :-

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

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

3. Creating our main MyApp extends StatelessWidget class.

4. Creating Widget Build area -> Material App -> Scaffold Widget -> Center Widget -> Container Widget. Now here we would create our main Text widget with decoration: TextDecoration.lineThrough and
decorationColor: Colors.red style. Here I’m using the red color you can use Color as per your choice.

5. Complete source code for main.dart file :-

Screenshot :-

Flutter Change StrikeThrough Text Line Color in Android iOS

Leave a Reply

Your email address will not be published. Required fields are marked *