merge method

LineTheme merge(
  1. LineTheme other
)

Creates a new LineTheme where each property from this object has been merged with the matching property from the other object.

Text style is merged using TextStyle.merge when this and other theme have this value set.

If padding property is set in other then it replaces value of this theme.

Implementation

LineTheme merge(LineTheme other) {
  if (other == null) return this;
  return copyWith(
    textStyle: textStyle?.merge(other.textStyle) ?? other.textStyle,
    padding: other.padding ?? padding,
  );
}