combine method

TextStyle combine(
  1. TextStyle? other
)

Implementation

TextStyle combine(TextStyle? other) {
  if (other == null) {
    return this;
  }
  if (!other.inherit) {
    return other;
  }

  return copyWith(
    inherit: other.inherit,
    color: other.color,
    backgroundColor: other.backgroundColor,
    fontSize: other.fontSize,
    fontWeight: other.fontWeight,
    fontStyle: other.fontStyle,
    letterSpacing: other.letterSpacing,
    wordSpacing: other.wordSpacing,
    textBaseline: other.textBaseline,
    height: other.height,
    leadingDistribution: other.leadingDistribution,
    locale: other.locale,
    foreground: other.foreground,
    background: other.background,
    shadows: other.shadows,
    fontFeatures: other.fontFeatures,
    fontVariations: other.fontVariations,
    decoration: TextDecoration.combine([
      if (decoration != null) decoration!,
      if (other.decoration != null) other.decoration!,
    ]),
    decorationColor: other.decorationColor,
    decorationStyle: other.decorationStyle,
    decorationThickness: other.decorationThickness,
    debugLabel: other.debugLabel,
    fontFamily: other.fontFamily,
    fontFamilyFallback: other.fontFamilyFallback,
    overflow: other.overflow,
  );
}