TextStyle class

Annotations
  • @immutable

Constructors

TextStyle.new({Token<Color>? color, Token<Color>? backgroundColor, double? fontSize, int? fontWeight, FontStyle? fontStyle, double? letterSpacing, double? wordSpacing, double? height, List<FontVariation>? fontVariations, TextDecoration? decoration, Color? decorationColor, TextDecorationStyle? decorationStyle, double? decorationThickness, String? debugLabel, String? fontFamily, String? package})
Creates a text style.
const

Properties

backgroundColor Token<Color>?
The color to use as the background for the text.
final
color Token<Color>?
The color to use when painting the text.
final
debugLabel String?
A human-readable description of this text style.
final
decoration TextDecoration?
The decorations to paint near the text (e.g., an underline).
final
decorationColor Color?
The color in which to paint the text decorations.
final
decorationStyle TextDecorationStyle?
The style in which to paint the text decorations (e.g., dashed).
final
decorationThickness double?
The thickness of the decoration stroke as a multiplier of the thickness defined by the font.
final
fontFamily String?
The name of the font to use when painting the text (e.g., Roboto).
final
fontSize double?
The size of glyphs (in logical pixels) to use when painting the text.
final
fontStyle FontStyle?
The typeface variant to use when drawing the letters (e.g., italics).
final
fontVariations List<FontVariation>?
A list of FontVariations that affect how a variable font is rendered.
final
fontWeight int?
The typeface thickness to use when painting the text (e.g., bold).
final
hashCode int
The hash code for this object.
no setterinherited
height double?
The height of this text span, as a multiple of the font size.
final
letterSpacing double?
The amount of space (in logical pixels) to add between each letter. A negative value can be used to bring the letters closer.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wordSpacing double?
The amount of space (in logical pixels) to add at each sequence of white-space (i.e. between each word). A negative value can be used to bring the words closer.
final

Methods

copyWith({Token<Color>? color, Token<Color>? backgroundColor, double? fontSize, int? fontWeight, FontStyle? fontStyle, double? letterSpacing, double? wordSpacing, double? height, TextDecoration? decoration, Color? decorationColor, TextDecorationStyle? decorationStyle, double? decorationThickness, String? debugLabel, String? fontFamily, String? package, List<FontVariation>? fontVariations}) TextStyle
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited