Message.fromJson constructor

Message.fromJson(
  1. Map json_
)

Implementation

Message.fromJson(core.Map json_)
    : this(
        accessoryWidgets: json_.containsKey('accessoryWidgets')
            ? (json_['accessoryWidgets'] as core.List)
                .map((value) => AccessoryWidget.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        actionResponse: json_.containsKey('actionResponse')
            ? ActionResponse.fromJson(json_['actionResponse']
                as core.Map<core.String, core.dynamic>)
            : null,
        annotations: json_.containsKey('annotations')
            ? (json_['annotations'] as core.List)
                .map((value) => Annotation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        argumentText: json_.containsKey('argumentText')
            ? json_['argumentText'] as core.String
            : null,
        attachedGifs: json_.containsKey('attachedGifs')
            ? (json_['attachedGifs'] as core.List)
                .map((value) => AttachedGif.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        attachment: json_.containsKey('attachment')
            ? (json_['attachment'] as core.List)
                .map((value) => Attachment.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        cards: json_.containsKey('cards')
            ? (json_['cards'] as core.List)
                .map((value) => Card.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        cardsV2: json_.containsKey('cardsV2')
            ? (json_['cardsV2'] as core.List)
                .map((value) => CardWithId.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        clientAssignedMessageId: json_.containsKey('clientAssignedMessageId')
            ? json_['clientAssignedMessageId'] as core.String
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        deleteTime: json_.containsKey('deleteTime')
            ? json_['deleteTime'] as core.String
            : null,
        deletionMetadata: json_.containsKey('deletionMetadata')
            ? DeletionMetadata.fromJson(json_['deletionMetadata']
                as core.Map<core.String, core.dynamic>)
            : null,
        emojiReactionSummaries: json_.containsKey('emojiReactionSummaries')
            ? (json_['emojiReactionSummaries'] as core.List)
                .map((value) => EmojiReactionSummary.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        fallbackText: json_.containsKey('fallbackText')
            ? json_['fallbackText'] as core.String
            : null,
        formattedText: json_.containsKey('formattedText')
            ? json_['formattedText'] as core.String
            : null,
        lastUpdateTime: json_.containsKey('lastUpdateTime')
            ? json_['lastUpdateTime'] as core.String
            : null,
        matchedUrl: json_.containsKey('matchedUrl')
            ? MatchedUrl.fromJson(
                json_['matchedUrl'] as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        privateMessageViewer: json_.containsKey('privateMessageViewer')
            ? User.fromJson(json_['privateMessageViewer']
                as core.Map<core.String, core.dynamic>)
            : null,
        quotedMessageMetadata: json_.containsKey('quotedMessageMetadata')
            ? QuotedMessageMetadata.fromJson(json_['quotedMessageMetadata']
                as core.Map<core.String, core.dynamic>)
            : null,
        sender: json_.containsKey('sender')
            ? User.fromJson(
                json_['sender'] as core.Map<core.String, core.dynamic>)
            : null,
        slashCommand: json_.containsKey('slashCommand')
            ? SlashCommand.fromJson(
                json_['slashCommand'] as core.Map<core.String, core.dynamic>)
            : null,
        space: json_.containsKey('space')
            ? Space.fromJson(
                json_['space'] as core.Map<core.String, core.dynamic>)
            : null,
        text: json_.containsKey('text') ? json_['text'] as core.String : null,
        thread: json_.containsKey('thread')
            ? Thread.fromJson(
                json_['thread'] as core.Map<core.String, core.dynamic>)
            : null,
        threadReply: json_.containsKey('threadReply')
            ? json_['threadReply'] as core.bool
            : null,
      );