merge method

If the value of the current instance is null, use the value of the other instance

Args: other (ZeroListTileStyle): The other style to merge with.

Returns: A new instance of ZeroListTileStyle with the values of the current instance and the other instance.

Implementation

ZeroListTileStyle merge(ZeroListTileStyle? other) {
  if (other == null) return this;
  return copyWith(
    selectedColor: other.selectedColor,
    hoverColor: other.hoverColor,
    backgroundColor: other.backgroundColor,
    titleTextStyle:
        titleTextStyle?.merge(other.titleTextStyle) ?? other.titleTextStyle,
    subTitleTextStyle: subTitleTextStyle?.merge(other.subTitleTextStyle) ??
        other.subTitleTextStyle,
    dividerColor: other.dividerColor,
    contentPadding: other.contentPadding,
    smallContentPadding: other.smallContentPadding,
    smallTitleTextStyle:
        smallTitleTextStyle?.merge(other.smallTitleTextStyle) ??
            other.smallSubTitleTextStyle,
    smallSubTitleTextStyle:
        smallSubTitleTextStyle?.merge(other.smallSubTitleTextStyle) ??
            other.smallSubTitleTextStyle,
  );
}