ScriptStyle class
How superscript and subscript text — <sup>, <sub> — is drawn.
Every field is optional; unset, the text is three quarters of the size of the text around it, in its colour.
- Annotations
Constructors
- ScriptStyle({double? scale, Color? color})
-
Creates a ScriptStyle. Null fields defer to the default.
const
Properties
- color → Color?
-
The text colour. Defaults to the surrounding text's.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double?
-
The text's size as a fraction of the surrounding text. Defaults to 0.75.
final
Methods
-
copyWith(
{double? scale, Color? color}) → ScriptStyle - A copy with the given fields replaced.
-
merge(
ScriptStyle? other) → ScriptStyle -
This style, with any unset field taken from
other, field by field. -
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.
override
Static Methods
-
lerp(
ScriptStyle? a, ScriptStyle? b, double t) → ScriptStyle? - Linearly interpolates between two styles.
Constants
- defaultScale → const double
- The default scale.