merge method

CodeBlockStyle merge(
  1. CodeBlockStyle? other
)

This style, with any unset field taken from other, field by field.

Implementation

CodeBlockStyle merge(CodeBlockStyle? other) {
  if (other == null) {
    return this;
  }
  return CodeBlockStyle(
    backgroundColor: backgroundColor ?? other.backgroundColor,
    borderColor: borderColor ?? other.borderColor,
    borderWidth: borderWidth ?? other.borderWidth,
    borderRadius: borderRadius ?? other.borderRadius,
    padding: padding ?? other.padding,
    headerPadding: headerPadding ?? other.headerPadding,
    fontFamily: fontFamily ?? other.fontFamily,
    fontFamilyPackage: fontFamilyPackage ?? other.fontFamilyPackage,
    fontSize: fontSize ?? other.fontSize,
    textColor: textColor ?? other.textColor,
    showLanguageLabel: showLanguageLabel ?? other.showLanguageLabel,
    languageStyle: languageStyle ?? other.languageStyle,
    showCopyButton: showCopyButton ?? other.showCopyButton,
    copyLabel: copyLabel ?? other.copyLabel,
    copiedLabel: copiedLabel ?? other.copiedLabel,
  );
}