merge method

TextStyle merge(
  1. TextStyle? other
)

merge API.

Implementation

TextStyle merge(TextStyle? other) {
  if (other == null) {
    return this;
  }
  return TextStyle(
    color: other.color ?? color,
    fontSize: other.fontSize ?? fontSize,
    fontWeight: other.fontWeight ?? fontWeight,
    fontStyle: other.fontStyle ?? fontStyle,
    decoration: other.decoration ?? decoration,
    lineSpacing: other.lineSpacing ?? lineSpacing,
    height: other.height ?? height,
    letterSpacing: other.letterSpacing ?? letterSpacing,
  );
}