Annotation.fromJson constructor

Annotation.fromJson(
  1. Map json_
)

Implementation

Annotation.fromJson(core.Map json_)
    : this(
        afterSelectedText: json_.containsKey('afterSelectedText')
            ? json_['afterSelectedText'] as core.String
            : null,
        beforeSelectedText: json_.containsKey('beforeSelectedText')
            ? json_['beforeSelectedText'] as core.String
            : null,
        clientVersionRanges: json_.containsKey('clientVersionRanges')
            ? AnnotationClientVersionRanges.fromJson(
                json_['clientVersionRanges']
                    as core.Map<core.String, core.dynamic>)
            : null,
        created: json_.containsKey('created')
            ? json_['created'] as core.String
            : null,
        currentVersionRanges: json_.containsKey('currentVersionRanges')
            ? AnnotationCurrentVersionRanges.fromJson(
                json_['currentVersionRanges']
                    as core.Map<core.String, core.dynamic>)
            : null,
        data: json_.containsKey('data') ? json_['data'] as core.String : null,
        deleted: json_.containsKey('deleted')
            ? json_['deleted'] as core.bool
            : null,
        highlightStyle: json_.containsKey('highlightStyle')
            ? json_['highlightStyle'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        layerId: json_.containsKey('layerId')
            ? json_['layerId'] as core.String
            : null,
        layerSummary: json_.containsKey('layerSummary')
            ? AnnotationLayerSummary.fromJson(
                json_['layerSummary'] as core.Map<core.String, core.dynamic>)
            : null,
        pageIds: json_.containsKey('pageIds')
            ? (json_['pageIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        selectedText: json_.containsKey('selectedText')
            ? json_['selectedText'] as core.String
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        updated: json_.containsKey('updated')
            ? json_['updated'] as core.String
            : null,
        volumeId: json_.containsKey('volumeId')
            ? json_['volumeId'] as core.String
            : null,
      );