SuperChatEventSnippet.fromJson constructor

SuperChatEventSnippet.fromJson(
  1. Map json_
)

Implementation

SuperChatEventSnippet.fromJson(core.Map json_)
    : this(
        amountMicros: json_.containsKey('amountMicros')
            ? json_['amountMicros'] as core.String
            : null,
        channelId: json_.containsKey('channelId')
            ? json_['channelId'] as core.String
            : null,
        commentText: json_.containsKey('commentText')
            ? json_['commentText'] as core.String
            : null,
        createdAt: json_.containsKey('createdAt')
            ? core.DateTime.parse(json_['createdAt'] as core.String)
            : null,
        currency: json_.containsKey('currency')
            ? json_['currency'] as core.String
            : null,
        displayString: json_.containsKey('displayString')
            ? json_['displayString'] as core.String
            : null,
        isSuperStickerEvent: json_.containsKey('isSuperStickerEvent')
            ? json_['isSuperStickerEvent'] as core.bool
            : null,
        messageType: json_.containsKey('messageType')
            ? json_['messageType'] as core.int
            : null,
        superStickerMetadata: json_.containsKey('superStickerMetadata')
            ? SuperStickerMetadata.fromJson(json_['superStickerMetadata']
                as core.Map<core.String, core.dynamic>)
            : null,
        supporterDetails: json_.containsKey('supporterDetails')
            ? ChannelProfileDetails.fromJson(json_['supporterDetails']
                as core.Map<core.String, core.dynamic>)
            : null,
      );