TextStyleExtension extension

The TextStyleExtension extension provides a set of convenience methods for extending the functionality of the TextStyle class in Flutter.

You can use these extension methods to quickly modify or customize text styles.

Example:

// Applying the 'bold' extension to a text style
Text(
  'Bold Text',
  style: myTextStyle.bold,
)
on

Properties

black TextStyle
Creates a copy of the text style with a black font color.
no setter
blue TextStyle
Creates a copy of the text style with a blue font color.
no setter
bold TextStyle
Creates a copy of the text style with a bold font weight.
no setter
fs10 TextStyle
Getter for a TextStyle with font size 10.
no setter
fs11 TextStyle
Getter for a TextStyle with font size 11.
no setter
fs12 TextStyle
Getter for a TextStyle with font size 12.
no setter
fs13 TextStyle
Getter for a TextStyle with font size 13.
no setter
fs14 TextStyle
Getter for a TextStyle with font size 14.
no setter
fs15 TextStyle
Getter for a TextStyle with font size 15.
no setter
fs16 TextStyle
Getter for a TextStyle with font size 16.
no setter
fs17 TextStyle
Getter for a TextStyle with font size 17.
no setter
fs18 TextStyle
Getter for a TextStyle with font size 18.
no setter
fs19 TextStyle
Getter for a TextStyle with font size 19.
no setter
fs20 TextStyle
Getter for a TextStyle with font size 20.
no setter
green TextStyle
Creates a copy of the text style with a green font color.
no setter
grey TextStyle
Creates a copy of the text style with a grey font color.
no setter
muted TextStyle
Creates a copy of the text style with a muted color (typically a light gray).
no setter
normal TextStyle
Creates a copy of the text style with a normal (regular) font weight.
no setter
orange TextStyle
Creates a copy of the text style with an orange font color.
no setter
red TextStyle
Creates a copy of the text style with a red font color.
no setter
white TextStyle
Creates a copy of the text style with a white font color.
no setter

Methods

fbold(bool value) TextStyle
Creates a copy of the text style with a custom font weight.
fcolor(Color color) TextStyle
Creates a copy of the text style with a custom font color.
fopacity(double opacity) TextStyle
Creates a copy of the text style with a custom opacity level.
fsize(double size) TextStyle
Creates a copy of the text style with a custom font size.