toJson method

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (authorChannelId != null) 'authorChannelId': authorChannelId!,
      if (displayMessage != null) 'displayMessage': displayMessage!,
      if (fanFundingEventDetails != null)
        'fanFundingEventDetails': fanFundingEventDetails!,
      if (giftMembershipReceivedDetails != null)
        'giftMembershipReceivedDetails': giftMembershipReceivedDetails!,
      if (hasDisplayContent != null) 'hasDisplayContent': hasDisplayContent!,
      if (liveChatId != null) 'liveChatId': liveChatId!,
      if (memberMilestoneChatDetails != null)
        'memberMilestoneChatDetails': memberMilestoneChatDetails!,
      if (membershipGiftingDetails != null)
        'membershipGiftingDetails': membershipGiftingDetails!,
      if (messageDeletedDetails != null)
        'messageDeletedDetails': messageDeletedDetails!,
      if (messageRetractedDetails != null)
        'messageRetractedDetails': messageRetractedDetails!,
      if (newSponsorDetails != null) 'newSponsorDetails': newSponsorDetails!,
      if (pollDetails != null) 'pollDetails': pollDetails!,
      if (publishedAt != null)
        'publishedAt': publishedAt!.toUtc().toIso8601String(),
      if (superChatDetails != null) 'superChatDetails': superChatDetails!,
      if (superStickerDetails != null)
        'superStickerDetails': superStickerDetails!,
      if (textMessageDetails != null)
        'textMessageDetails': textMessageDetails!,
      if (type != null) 'type': type!,
      if (userBannedDetails != null) 'userBannedDetails': userBannedDetails!,
    };