PackageNote.fromJson constructor

PackageNote.fromJson(
  1. Map json_
)

Implementation

PackageNote.fromJson(core.Map json_)
    : this(
        architecture: json_.containsKey('architecture')
            ? json_['architecture'] as core.String
            : null,
        cpeUri: json_.containsKey('cpeUri')
            ? json_['cpeUri'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        digest: json_.containsKey('digest')
            ? (json_['digest'] as core.List)
                .map((value) => Digest.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        distribution: json_.containsKey('distribution')
            ? (json_['distribution'] as core.List)
                .map((value) => Distribution.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        license: json_.containsKey('license')
            ? License.fromJson(
                json_['license'] as core.Map<core.String, core.dynamic>)
            : null,
        maintainer: json_.containsKey('maintainer')
            ? json_['maintainer'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        packageType: json_.containsKey('packageType')
            ? json_['packageType'] as core.String
            : null,
        url: json_.containsKey('url') ? json_['url'] as core.String : null,
        version: json_.containsKey('version')
            ? Version.fromJson(
                json_['version'] as core.Map<core.String, core.dynamic>)
            : null,
      );