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,
        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,
      );