TextStyleMix class
Mix representation of TextStyle.
Comprehensive text styling with tokens.
Constructors
-
TextStyleMix({Color? color, Color? backgroundColor, double? fontSize, FontWeight? fontWeight, FontStyle? fontStyle, double? letterSpacing, String? debugLabel, double? wordSpacing, TextBaseline? textBaseline, List<
ShadowMix> ? shadows, List<FontFeature> ? fontFeatures, TextDecoration? decoration, Color? decorationColor, TextDecorationStyle? decorationStyle, List<FontVariation> ? fontVariations, double? height, Paint? foreground, Paint? background, double? decorationThickness, String? fontFamily, List<String> ? fontFamilyFallback, bool? inherit}) - TextStyleMix.background(Paint value)
-
Factory for background paint
factory
- TextStyleMix.backgroundColor(Color value)
-
Creates with background color.
factory
- TextStyleMix.color(Color value)
-
Creates with text color.
factory
-
TextStyleMix.create({Prop<
Color> ? color, Prop<Color> ? backgroundColor, Prop<double> ? fontSize, Prop<FontWeight> ? fontWeight, Prop<FontStyle> ? fontStyle, Prop<double> ? letterSpacing, Prop<String> ? debugLabel, Prop<double> ? wordSpacing, Prop<TextBaseline> ? textBaseline, Prop<List< ? shadows, Prop<Shadow> >List< ? fontFeatures, Prop<FontFeature> >TextDecoration> ? decoration, Prop<Color> ? decorationColor, Prop<TextDecorationStyle> ? decorationStyle, Prop<List< ? fontVariations, Prop<FontVariation> >double> ? height, Prop<Paint> ? foreground, Prop<Paint> ? background, Prop<double> ? decorationThickness, Prop<String> ? fontFamily, Prop<List< ? fontFamilyFallback, Prop<String> >bool> ? inherit}) -
const
- TextStyleMix.debugLabel(String value)
-
Creates with debug label.
factory
- TextStyleMix.decoration(TextDecoration value)
-
Factory for text decoration
factory
- TextStyleMix.decorationColor(Color value)
-
Factory for decoration color
factory
- TextStyleMix.decorationStyle(TextDecorationStyle value)
-
Factory for decoration style
factory
- TextStyleMix.decorationThickness(double value)
-
Factory for decoration thickness
factory
- TextStyleMix.fontFamily(String value)
-
Factory for font family
factory
-
TextStyleMix.fontFamilyFallback(List<
String> value) -
Factory for font family fallback
factory
-
TextStyleMix.fontFeatures(List<
FontFeature> value) -
Factory for font features
factory
- TextStyleMix.fontSize(double value)
-
Creates with font size.
factory
- TextStyleMix.fontStyle(FontStyle value)
-
Creates with font style.
factory
-
TextStyleMix.fontVariations(List<
FontVariation> value) -
Factory for font variations
factory
- TextStyleMix.fontWeight(FontWeight value)
-
Creates with font weight.
factory
- TextStyleMix.foreground(Paint value)
-
Factory for foreground paint
factory
- TextStyleMix.height(double value)
-
Factory for line height
factory
- TextStyleMix.inherit(bool value)
-
Factory for inherit
factory
- TextStyleMix.letterSpacing(double value)
-
Creates with letter spacing.
factory
- TextStyleMix.shadow(ShadowMix value)
-
Factory for a single text shadow.
factory
-
TextStyleMix.shadows(List<
ShadowMix> value) -
Factory for shadows
factory
- TextStyleMix.textBaseline(TextBaseline value)
-
Creates with text baseline.
factory
- TextStyleMix.value(TextStyle textStyle)
- Creates a TextStyleMix from an existing TextStyle.
- TextStyleMix.wordSpacing(double value)
-
Creates with word spacing.
factory
Properties
-
$background
→ Prop<
Paint> ? -
final
-
$backgroundColor
→ Prop<
Color> ? -
final
-
$color
→ Prop<
Color> ? -
final
-
$debugLabel
→ Prop<
String> ? -
final
-
$decoration
→ Prop<
TextDecoration> ? -
final
-
$decorationColor
→ Prop<
Color> ? -
final
-
$decorationStyle
→ Prop<
TextDecorationStyle> ? -
final
-
$decorationThickness
→ Prop<
double> ? -
final
-
$fontFamily
→ Prop<
String> ? -
final
-
$fontFamilyFallback
→ Prop<
List< ?String> > -
final
-
$fontFeatures
→ Prop<
List< ?FontFeature> > -
final
-
$fontSize
→ Prop<
double> ? -
final
-
$fontStyle
→ Prop<
FontStyle> ? -
final
-
$fontVariations
→ Prop<
List< ?FontVariation> > -
final
-
$fontWeight
→ Prop<
FontWeight> ? -
final
-
$foreground
→ Prop<
Paint> ? -
final
-
$height
→ Prop<
double> ? -
final
-
$inherit
→ Prop<
bool> ? -
final
-
$letterSpacing
→ Prop<
double> ? -
final
-
$shadows
→ Prop<
List< ?Shadow> > -
final
-
$textBaseline
→ Prop<
TextBaseline> ? -
final
-
$wordSpacing
→ Prop<
double> ? -
final
- hashCode → int
-
Overrides the hash code getter to compute hash code based on properties.
no setterinherited
- mergeKey → Object
-
The key used to identify compatible types for merging.
no setterinherited
-
props
→ List<
Object?> -
The properties based on which equality and hash code are computed.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool
-
Whether to use a detailed string representation of the object.
no setterinherited
Methods
-
background(
Paint value) → TextStyleMix - Sets background paint
-
backgroundColor(
Color value) → TextStyleMix - Sets background color
-
color(
Color value) → TextStyleMix - Sets text color
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
debugLabel(
String value) → TextStyleMix - Sets debug label
-
decoration(
TextDecoration value) → TextStyleMix - Sets text decoration
-
decorationColor(
Color value) → TextStyleMix - Sets decoration color
-
decorationStyle(
TextDecorationStyle value) → TextStyleMix - Sets decoration style
-
decorationThickness(
double value) → TextStyleMix - Sets decoration thickness
-
fontFamily(
String value) → TextStyleMix - Sets font family
-
fontFamilyFallback(
List< String> value) → TextStyleMix - Sets font family fallback
-
fontFeatures(
List< FontFeature> value) → TextStyleMix - Sets font features
-
fontSize(
double value) → TextStyleMix - Sets font size
-
fontStyle(
FontStyle value) → TextStyleMix - Sets font style
-
fontVariations(
List< FontVariation> value) → TextStyleMix - Sets font variations
-
fontWeight(
FontWeight value) → TextStyleMix - Sets font weight
-
foreground(
Paint value) → TextStyleMix - Sets foreground paint
-
getDiff(
Equatable other) → Map< String, String> -
Returns a map of properties that differ between this object and another.
inherited
-
height(
double value) → TextStyleMix - Sets line height
-
inherit(
bool value) → TextStyleMix - Sets inherit
-
letterSpacing(
double value) → TextStyleMix - Sets letter spacing
-
merge(
covariant TextStyleMix? other) → TextStyleMix -
Merges with another TextStyleMix.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
BuildContext context) → TextStyle -
Resolves this to a concrete value using the provided
context.override -
shadow(
ShadowMix value) → TextStyleMix - Sets a single shadow.
-
shadows(
List< ShadowMix> value) → TextStyleMix - Sets shadows
-
textBaseline(
TextBaseline value) → TextStyleMix - Sets text baseline
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
wordSpacing(
double value) → TextStyleMix - Sets word spacing
Operators
-
operator ==(
Object other) → bool -
Overrides the equality operator to compare based on the properties.
inherited
Static Methods
-
maybeValue(
TextStyle? textStyle) → TextStyleMix? - Constructor that accepts a nullable TextStyle value and extracts its properties.