LiveChatMessageSnippet.fromJson constructor

LiveChatMessageSnippet.fromJson(
  1. Map json_
)

Implementation

LiveChatMessageSnippet.fromJson(core.Map json_)
    : this(
        authorChannelId: json_.containsKey('authorChannelId')
            ? json_['authorChannelId'] as core.String
            : null,
        displayMessage: json_.containsKey('displayMessage')
            ? json_['displayMessage'] as core.String
            : null,
        fanFundingEventDetails: json_.containsKey('fanFundingEventDetails')
            ? LiveChatFanFundingEventDetails.fromJson(
                json_['fanFundingEventDetails']
                    as core.Map<core.String, core.dynamic>)
            : null,
        giftMembershipReceivedDetails:
            json_.containsKey('giftMembershipReceivedDetails')
                ? LiveChatGiftMembershipReceivedDetails.fromJson(
                    json_['giftMembershipReceivedDetails']
                        as core.Map<core.String, core.dynamic>)
                : null,
        hasDisplayContent: json_.containsKey('hasDisplayContent')
            ? json_['hasDisplayContent'] as core.bool
            : null,
        liveChatId: json_.containsKey('liveChatId')
            ? json_['liveChatId'] as core.String
            : null,
        memberMilestoneChatDetails:
            json_.containsKey('memberMilestoneChatDetails')
                ? LiveChatMemberMilestoneChatDetails.fromJson(
                    json_['memberMilestoneChatDetails']
                        as core.Map<core.String, core.dynamic>)
                : null,
        membershipGiftingDetails:
            json_.containsKey('membershipGiftingDetails')
                ? LiveChatMembershipGiftingDetails.fromJson(
                    json_['membershipGiftingDetails']
                        as core.Map<core.String, core.dynamic>)
                : null,
        messageDeletedDetails: json_.containsKey('messageDeletedDetails')
            ? LiveChatMessageDeletedDetails.fromJson(
                json_['messageDeletedDetails']
                    as core.Map<core.String, core.dynamic>)
            : null,
        messageRetractedDetails: json_.containsKey('messageRetractedDetails')
            ? LiveChatMessageRetractedDetails.fromJson(
                json_['messageRetractedDetails']
                    as core.Map<core.String, core.dynamic>)
            : null,
        newSponsorDetails: json_.containsKey('newSponsorDetails')
            ? LiveChatNewSponsorDetails.fromJson(json_['newSponsorDetails']
                as core.Map<core.String, core.dynamic>)
            : null,
        pollDetails: json_.containsKey('pollDetails')
            ? LiveChatPollDetails.fromJson(
                json_['pollDetails'] as core.Map<core.String, core.dynamic>)
            : null,
        publishedAt: json_.containsKey('publishedAt')
            ? core.DateTime.parse(json_['publishedAt'] as core.String)
            : null,
        superChatDetails: json_.containsKey('superChatDetails')
            ? LiveChatSuperChatDetails.fromJson(json_['superChatDetails']
                as core.Map<core.String, core.dynamic>)
            : null,
        superStickerDetails: json_.containsKey('superStickerDetails')
            ? LiveChatSuperStickerDetails.fromJson(
                json_['superStickerDetails']
                    as core.Map<core.String, core.dynamic>)
            : null,
        textMessageDetails: json_.containsKey('textMessageDetails')
            ? LiveChatTextMessageDetails.fromJson(json_['textMessageDetails']
                as core.Map<core.String, core.dynamic>)
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        userBannedDetails: json_.containsKey('userBannedDetails')
            ? LiveChatUserBannedMessageDetails.fromJson(
                json_['userBannedDetails']
                    as core.Map<core.String, core.dynamic>)
            : null,
      );