SceneTextStyle class

A text style: the text subset of the property table, as one value — what a token names and a TextNode takes as style:, so a whole typographic treatment is shared in one move.

Every field is nullable, because a style sets what it sets: a style that says only weight leaves size and colour to the table's defaults. A node spells ONE of these and nothing else — an override is tokens.title.copyWith(fontSize: 60), a delta on the style rather than a property beside it. A property written equal to the style's is indistinguishable from an inherited one and follows the style; there is no override flag, by decision.

Constructors

SceneTextStyle({String? fontFamily, double? fontSize, SceneFontWeight? weight, bool? italic, double? letterSpacing, double? wordSpacing, double? lineHeight, SceneColor? color, SceneTextCase? textCase, SceneTextDecoration? decoration, SceneColor? decorationColor, double? decorationThickness, SceneTextDecorationStyle? decorationStyle, List<TextLayer>? layers, Map<String, double>? axes})
const
SceneTextStyle.fromValues(Map<String, Object?> v)
A style from the table's own names — what a reader builds when it has values by name rather than by field, and the inverse of values.
factory

Properties

axes → Map<String, double>?
A variable face's axes, by their four-letter tags — wght, wdth, slnt, and whatever else the font declares. Null is "this style says nothing about them"; an EMPTY map is a style that puts every axis back at the font's own default, which is how a style clears axes it inherited.
final
color → SceneColor?
final
decoration → SceneTextDecoration?
final
decorationColor → SceneColor?
Null means the line takes the text's own colour.
final
decorationStyle → SceneTextDecorationStyle?
final
decorationThickness → double?
final
fontFamily → String?
The family name as the app declares it in its pubspec, or null to take whatever the surrounding DefaultTextStyle gives.
final
fontSize → double?
final
hashCode → int
The hash code for this object.
no setteroverride
italic → bool?
final
layers → List<TextLayer>?
The paint stack, back to front. Null is "this style says nothing about paint"; an EMPTY list is a style that says the text is painted once, with its own colour — which is how a style clears a stack it inherited.
final
letterSpacing → double?
Tracking, in logical pixels — negative tightens, which is what a display size almost always wants.
final
lineHeight → double?
Leading, as a multiple of the font size.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textCase → SceneTextCase?
final
values → Map<String, Object>
The properties this style sets, by the table's name — what an emitter compares a node against, and what an inspector marks as inherited.
no setter
weight → SceneFontWeight?
final
wordSpacing → double?
final

Methods

copyWith({String? fontFamily, double? fontSize, SceneFontWeight? weight, bool? italic, double? letterSpacing, double? wordSpacing, double? lineHeight, SceneColor? color, SceneTextCase? textCase, SceneTextDecoration? decoration, SceneColor? decorationColor, double? decorationThickness, SceneTextDecorationStyle? decorationStyle, List<TextLayer>? layers, Map<String, double>? axes}) → SceneTextStyle
This style with values laid over it — the delta spelling a node uses, and the one place the file says "that treatment, but bigger". A null argument is "not given": a style cannot unset a property, because resetting to the style is what the editor does instead.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sets(String prop) → bool
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override