TextStyleExtension extension

on

Methods

fontFamily(String family) Text

Available on Text, provided by the TextStyleExtension extension

Applies the given family to the text's font.
fontSize(double size) Text

Available on Text, provided by the TextStyleExtension extension

Creates a new Text widget with the provided properties, copying over the properties from the current Text widget that are not explicitly provided.
fontWeight(FontWeight weight) Text

Available on Text, provided by the TextStyleExtension extension

Applies the given weight to the text's font.
letterSpacing(double spacing) Text

Available on Text, provided by the TextStyleExtension extension

Applies the given spacing to the text's letter spacing.
lineHeight(double height) Text

Available on Text, provided by the TextStyleExtension extension

Applies the given height to the text's line height.
maxLines(int lines) Text

Available on Text, provided by the TextStyleExtension extension

Sets the maximum number of lines for the text.
overflow(TextOverflow overflow) Text

Available on Text, provided by the TextStyleExtension extension

Sets the overflow behavior for the text.
textAlign(TextAlign align) Text

Available on Text, provided by the TextStyleExtension extension

Sets the text alignment to align.
textColor(Color color) Text

Available on Text, provided by the TextStyleExtension extension

Applies the given color to the text.
textDecoration(TextDecoration decoration) Text

Available on Text, provided by the TextStyleExtension extension

Applies the given decoration to the text's decoration.
withStyle({Color? color, double? fontSize, FontWeight? fontWeight, String? fontFamily, List<String>? fontFamilyFallback, double? height, double? letterSpacing, double? wordSpacing, TextBaseline? textBaseline, TextDecoration? decoration, Color? decorationColor, TextDecorationStyle? decorationStyle, double? decorationThickness, Paint? foreground, Paint? background, List<Shadow>? shadows, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations}) Text

Available on Text, provided by the TextStyleExtension extension

A flexible method that allows setting multiple style properties of the text at once.
withTextProperties({TextAlign? textAlign, TextDirection? textDirection, bool? softWrap, TextOverflow? overflow, int? maxLines, String? semanticsLabel, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, StrutStyle? strutStyle, Locale? locale, Color? selectionColor}) Text

Available on Text, provided by the TextStyleExtension extension

A flexible method that allows setting multiple layout properties of the text at once.