Reputation: 5993
After reading flutter documentation I got information about how to underline text. But My problem is, I needed a simple text style with bolder underline.
Upvotes: 4
Views: 5130
Reputation: 746
Apply decorationThickness in a Text Style
The default decorationThickness is 1.0, which will use the font's base stroke thickness/width.
Text( 'This has a very BOLD strike through!', style: TextStyle( decoration: TextDecoration.lineThrough, decorationThickness: 2.85, ), )
Upvotes: 2
Reputation: 9764
Try adding the decoration in TextStyle.
Text(
'Flutter Developer',
style: TextStyle(
decoration: TextDecoration.underline,
decorationThickness: 4,
),
);
Upvotes: 10