copyWith method

SponsoredMessage copyWith({
  1. int? messageId,
  2. bool? isRecommended,
  3. bool? canBeReported,
  4. MessageContent? content,
  5. AdvertisementSponsor? sponsor,
  6. String? title,
  7. String? buttonText,
  8. int? accentColorId,
  9. int? backgroundCustomEmojiId,
  10. String? additionalInfo,
})

Implementation

SponsoredMessage copyWith({
  int? messageId,
  bool? isRecommended,
  bool? canBeReported,
  MessageContent? content,
  AdvertisementSponsor? sponsor,
  String? title,
  String? buttonText,
  int? accentColorId,
  int? backgroundCustomEmojiId,
  String? additionalInfo,
}) =>
    SponsoredMessage(
      messageId: messageId ?? this.messageId,
      isRecommended: isRecommended ?? this.isRecommended,
      canBeReported: canBeReported ?? this.canBeReported,
      content: content ?? this.content,
      sponsor: sponsor ?? this.sponsor,
      title: title ?? this.title,
      buttonText: buttonText ?? this.buttonText,
      accentColorId: accentColorId ?? this.accentColorId,
      backgroundCustomEmojiId:
          backgroundCustomEmojiId ?? this.backgroundCustomEmojiId,
      additionalInfo: additionalInfo ?? this.additionalInfo,
    );