TextStyle class

Represents the styling that can be applied to text.

Inherited text styles are represented as unset fields in this message. A text style's parent depends on where the text style is defined: * The TextStyle of text in a Paragraph inherits from the paragraph's corresponding named style type. * The TextStyle on a named style inherits from the normal text named style. * The TextStyle of the normal text named style inherits from the default text style in the Docs editor. * The TextStyle on a Paragraph element that's contained in a table may inherit its text style from the table style. If the text style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.

Constructors

TextStyle({OptionalColor? backgroundColor, String? baselineOffset, bool? bold, Dimension? fontSize, OptionalColor? foregroundColor, bool? italic, Link? link, bool? smallCaps, bool? strikethrough, bool? underline, WeightedFontFamily? weightedFontFamily})
TextStyle.fromJson(Map json_)

Properties

backgroundColor OptionalColor?
The background color of the text.
getter/setter pair
baselineOffset String?
The text's vertical offset from its normal position.
getter/setter pair
bold bool?
Whether or not the text is rendered as bold.
getter/setter pair
fontSize Dimension?
The size of the text's font.
getter/setter pair
foregroundColor OptionalColor?
The foreground color of the text.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
italic bool?
Whether or not the text is italicized.
getter/setter pair
The hyperlink destination of the text.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
smallCaps bool?
Whether or not the text is in small capital letters.
getter/setter pair
strikethrough bool?
Whether or not the text is struck through.
getter/setter pair
underline bool?
Whether or not the text is underlined.
getter/setter pair
weightedFontFamily WeightedFontFamily?
The font family and rendered weight of the text.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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