TypeStyle class

Metadata for character formatting.

Available Extensions
Annotations
  • @JsonSerializable()
  • @CopyWith()

Constructors

TypeStyle({String? fontFamily, String? fontPostScriptName, num? paragraphSpacing, num? paragraphIndent, bool? italic, num? fontWeight, num? fontSize, TextCase? textCase, TextDecoration? textDecoration, TextAutoResize? textAutoResize, TextAlignHorizontal? textAlignHorizontal, TextAlignVertical? textAlignVertical, num? letterSpacing, List<Paint>? fills, Map<String, num>? opentypeFlags, num? lineHeightPx, num? lineHeightPercent, num? lineHeightPercentFontSize, LineHeightUnit? lineHeightUnit})
TypeStyle.fromJson(Map<String, dynamic> json)
factory

Properties

fills List<Paint>?
Paints applied to characters.
final
fontFamily String?
Font family of text (standard name).
final
fontPostScriptName String?
PostScript font name.
final
fontSize num?
Font size in px.
final
fontWeight num?
Numeric font weight.
final
hashCode int
The hash code for this object.
no setterinherited
italic bool?
Whether or not text is italicized.
final
letterSpacing num?
Space between characters in px.
final
lineHeightPercent num?
Line height as a percentage of normal line height. This is deprecated; in a future version of the API only lineHeightPx and lineHeightPercentFontSize will be returned.
final
lineHeightPercentFontSize num?
Line height as a percentage of the font size. Only returned when lineHeightPercent is not 100.
final
lineHeightPx num?
Line height in px.
final
lineHeightUnit LineHeightUnit?
The unit of the line height value specified by the user.
final
opentypeFlags Map<String, num>?
A map of OpenType feature flags to 1 or 0, 1 if it is enabled and 0 if it is disabled. Note that some flags aren't reflected here. For example, SMCP (small caps) is still represented by the textCase field.
final
paragraphIndent num?
Paragraph indentation in px, 0 if not present.
final
paragraphSpacing num?
Space between paragraphs in px, 0 if not present.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
textAlignHorizontal TextAlignHorizontal?
Horizontal text alignment as string enum.
final
textAlignVertical TextAlignVertical?
Vertical text alignment as string enum.
final
textAutoResize TextAutoResize?
Dimensions along which text will auto resize, default is that the text does not auto-resize.
final
textCase TextCase?
Text casing applied to the node, default is the original casing.
final
textDecoration TextDecoration?
Text decoration applied to the node, default is none.
final

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