TextExtension extension

Extension on Text widget to provide convenient styling methods

on

Properties

black Text

Available on Text, provided by the TextExtension extension

Sets font weight to black (w900)
no setter
body1 Text

Available on Text, provided by the TextExtension extension

Applies body1 style: font size 16 logical pixels and light font weight
no setter
body2 Text

Available on Text, provided by the TextExtension extension

Applies body2 style: font size 14 logical pixels and medium font weight
no setter
bold Text

Available on Text, provided by the TextExtension extension

Sets font weight to bold (w700)
no setter
caption1 Text

Available on Text, provided by the TextExtension extension

Applies caption1 style: font size 12 logical pixels and light font weight
no setter
caption2 Text

Available on Text, provided by the TextExtension extension

Applies caption2 style: font size 10 logical pixels and light font weight
no setter
clip Text

Available on Text, provided by the TextExtension extension

Sets overflow behavior to clip (overflowing text is clipped)
no setter
ellipsis Text

Available on Text, provided by the TextExtension extension

Sets overflow behavior to ellipsis (overflowing text is replaced with an ellipsis)
no setter
extraBold Text

Available on Text, provided by the TextExtension extension

Sets font weight to extra bold (w800)
no setter
extraLight Text

Available on Text, provided by the TextExtension extension

Sets font weight to extra light (w200)
no setter
fade Text

Available on Text, provided by the TextExtension extension

Sets overflow behavior to fade (overflowing text fades out)
no setter
h1 Text

Available on Text, provided by the TextExtension extension

Applies h1 style: font size 96 logical pixels and light font weight
no setter
h2 Text

Available on Text, provided by the TextExtension extension

Applies h2 style: font size 60 logical pixels and light font weight
no setter
h3 Text

Available on Text, provided by the TextExtension extension

Applies h3 style: font size 48 logical pixels and regular font weight
no setter
h4 Text

Available on Text, provided by the TextExtension extension

Applies h4 style: font size 34 logical pixels and regular font weight
no setter
h5 Text

Available on Text, provided by the TextExtension extension

Applies h5 style: font size 24 logical pixels and regular font weight
no setter
h6 Text

Available on Text, provided by the TextExtension extension

Applies h6 style: font size 20 logical pixels and medium font weight
no setter
italic Text

Available on Text, provided by the TextExtension extension

Sets font style to italic
no setter
lg Text

Available on Text, provided by the TextExtension extension

Sets text scale to large (1.125)
no setter
light Text

Available on Text, provided by the TextExtension extension

Sets font weight to light (w300)
no setter
md Text

Available on Text, provided by the TextExtension extension

Sets text scale to medium (1.0, default)
no setter
medium Text

Available on Text, provided by the TextExtension extension

Sets font weight to medium (w500)
no setter
normal Text

Available on Text, provided by the TextExtension extension

Sets font weight to normal (w400)
no setter
rtl Text

Available on Text, provided by the TextExtension extension

Sets the text direction to right-to-left
no setter
semiBold Text

Available on Text, provided by the TextExtension extension

Sets font weight to semi-bold (w600)
no setter
sm Text

Available on Text, provided by the TextExtension extension

Sets text scale to small (0.875)
no setter
textCenter Text

Available on Text, provided by the TextExtension extension

Aligns the text in the center of the container
no setter
textEnd Text

Available on Text, provided by the TextExtension extension

Aligns the text to the end edge of the container (depends on text direction)
no setter
textJustify Text

Available on Text, provided by the TextExtension extension

Justifies the text
no setter
textLeft Text

Available on Text, provided by the TextExtension extension

Aligns the text to the left edge of the container
no setter
textRight Text

Available on Text, provided by the TextExtension extension

Aligns the text to the right edge of the container
no setter
textStart Text

Available on Text, provided by the TextExtension extension

Aligns the text to the start edge of the container (depends on text direction)
no setter
thin Text

Available on Text, provided by the TextExtension extension

Sets font weight to thin (w100)
no setter
underline Text

Available on Text, provided by the TextExtension extension

Adds an underline to the text
no setter
visible Text

Available on Text, provided by the TextExtension extension

Sets overflow behavior to visible (text can overflow its bounds)
no setter
xl Text

Available on Text, provided by the TextExtension extension

Sets text scale to extra large (1.25)
no setter
xl2 Text

Available on Text, provided by the TextExtension extension

Sets text scale to 2x extra large (1.5)
no setter
xl3 Text

Available on Text, provided by the TextExtension extension

Sets text scale to 3x extra large (1.875)
no setter
xl4 Text

Available on Text, provided by the TextExtension extension

Sets text scale to 4x extra large (2.25)
no setter
xl5 Text

Available on Text, provided by the TextExtension extension

Sets text scale to 5x extra large (3.0)
no setter
xl6 Text

Available on Text, provided by the TextExtension extension

Sets text scale to 6x extra large (4.0)
no setter
xs Text

Available on Text, provided by the TextExtension extension

Sets text scale to extra small (0.75)
no setter

Methods

bgColor(Color backgroundColor) Text

Available on Text, provided by the TextExtension extension

Sets text background color
color(Color color) Text

Available on Text, provided by the TextExtension extension

Sets text color
fontFamily(String fontFamily) Text

Available on Text, provided by the TextExtension extension

Sets the font family for the text
fontSize(double fontSize) Text

Available on Text, provided by the TextExtension extension

Sets the font size of the text
letterSpacing(double spacing) Text

Available on Text, provided by the TextExtension extension

Sets letter spacing
lineHeight(double height) Text

Available on Text, provided by the TextExtension extension

Sets custom line height
maxLine([int? maxLines]) Text

Available on Text, provided by the TextExtension extension

Sets maximum number of lines for the text
softWrap(bool softWrap) Text

Available on Text, provided by the TextExtension extension

Controls whether the text should break at soft line breaks
style({Key? key, TextStyle? style, StrutStyle? strutStyle, bool? softWrap, TextOverflow? overflow, TextDirection? textDirection, Locale? locale, String? semanticsLabel, TextScaler? textScaler, TextWidthBasis? textWidthBasis, int? maxLines, TextAlign? textAlign}) Text

Available on Text, provided by the TextExtension extension

Applies a TextStyle to the existing text style
textScale(TextScaler textScaler) Text

Available on Text, provided by the TextExtension extension

Sets the text scale factor
wordSpacing(double spacing) Text

Available on Text, provided by the TextExtension extension

Sets word spacing