mergeIfNull method

Implementation

CometChatMessageBubbleStyleData mergeIfNull(
    CometChatMessageBubbleStyleData? other) {
  if (other == null) return this;
  return copyWith(
    messageBubbleBackgroundImage:
        messageBubbleBackgroundImage ?? other.messageBubbleBackgroundImage,
    backgroundColor: backgroundColor ?? other.backgroundColor,
    border: border ?? other.border,
    borderRadius: borderRadius ?? other.borderRadius,
    threadedMessageIndicatorTextStyle: threadedMessageIndicatorTextStyle ??
        other.threadedMessageIndicatorTextStyle,
    threadedMessageIndicatorIconColor: threadedMessageIndicatorIconColor ??
        other.threadedMessageIndicatorIconColor,
    messageBubbleAvatarStyle:
        messageBubbleAvatarStyle ?? other.messageBubbleAvatarStyle,
    messageBubbleDateStyle:
        messageBubbleDateStyle ?? other.messageBubbleDateStyle,
    senderNameTextStyle: senderNameTextStyle ?? other.senderNameTextStyle,
    messageReceiptStyle: messageReceiptStyle ?? other.messageReceiptStyle,
    moderationBackgroundColor:
        moderationBackgroundColor ?? other.moderationBackgroundColor,
    moderationTextStyle: moderationTextStyle ?? other.moderationTextStyle,
    moderationIconTint: moderationIconTint ?? other.moderationIconTint,
    exceptionBackgroundColor: exceptionBackgroundColor ?? other.exceptionBackgroundColor,
    exceptionTextStyle: exceptionTextStyle ?? other.exceptionTextStyle,
    exceptionIconTint: exceptionIconTint ?? other.exceptionIconTint,
  );
}