Annotation.fromJson constructor

Annotation.fromJson(
  1. Map json_
)

Implementation

Annotation.fromJson(core.Map json_)
    : this(
        length:
            json_.containsKey('length') ? json_['length'] as core.int : null,
        richLinkMetadata: json_.containsKey('richLinkMetadata')
            ? RichLinkMetadata.fromJson(json_['richLinkMetadata']
                as core.Map<core.String, core.dynamic>)
            : null,
        slashCommand: json_.containsKey('slashCommand')
            ? SlashCommandMetadata.fromJson(
                json_['slashCommand'] as core.Map<core.String, core.dynamic>)
            : null,
        startIndex: json_.containsKey('startIndex')
            ? json_['startIndex'] as core.int
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        userMention: json_.containsKey('userMention')
            ? UserMentionMetadata.fromJson(
                json_['userMention'] as core.Map<core.String, core.dynamic>)
            : null,
      );