NpmPackage.fromJson constructor

NpmPackage.fromJson(
  1. Map json_
)

Implementation

NpmPackage.fromJson(core.Map json_)
    : this(
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        packageName: json_.containsKey('packageName')
            ? json_['packageName'] as core.String
            : null,
        tags: json_.containsKey('tags')
            ? (json_['tags'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
        version: json_.containsKey('version')
            ? json_['version'] as core.String
            : null,
      );