copyWith method

  1. @override
InlineTextStyle copyWith(
  1. covariant InlineTextStyle other
)
override

Creates a new FlameTextStyle, preferring the properties of other if present, falling back to the properties of this.

Implementation

@override
InlineTextStyle copyWith(InlineTextStyle other) {
  return InlineTextStyle(
    color: other.color ?? color,
    fontFamily: other.fontFamily ?? fontFamily,
    fontSize: other.fontSize ?? fontSize,
    fontScale: other.fontScale ?? fontScale,
    fontWeight: other.fontWeight ?? fontWeight,
    fontStyle: other.fontStyle ?? fontStyle,
    letterSpacing: other.letterSpacing ?? letterSpacing,
    wordSpacing: other.wordSpacing ?? wordSpacing,
    height: other.height ?? height,
    leadingDistribution: other.leadingDistribution ?? leadingDistribution,
    shadows: other.shadows ?? shadows,
    fontFeatures: other.fontFeatures ?? fontFeatures,
    fontVariations: other.fontVariations ?? fontVariations,
    decoration: other.decoration ?? decoration,
    decorationColor: other.decorationColor ?? decorationColor,
    decorationStyle: other.decorationStyle ?? decorationStyle,
    decorationThickness: other.decorationThickness ?? decorationThickness,
    background: other.background ?? background,
    foreground: other.foreground ?? foreground,
  );
}