Webfont.fromJson constructor

Webfont.fromJson(
  1. Map json_
)

Implementation

Webfont.fromJson(core.Map json_)
    : this(
        axes: json_.containsKey('axes')
            ? (json_['axes'] as core.List)
                .map((value) => Axis.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        category: json_.containsKey('category')
            ? json_['category'] as core.String
            : null,
        colorCapabilities: json_.containsKey('colorCapabilities')
            ? (json_['colorCapabilities'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        family: json_.containsKey('family')
            ? json_['family'] as core.String
            : null,
        files: json_.containsKey('files')
            ? (json_['files'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        lastModified: json_.containsKey('lastModified')
            ? json_['lastModified'] as core.String
            : null,
        menu: json_.containsKey('menu') ? json_['menu'] as core.String : null,
        subsets: json_.containsKey('subsets')
            ? (json_['subsets'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        variants: json_.containsKey('variants')
            ? (json_['variants'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        version: json_.containsKey('version')
            ? json_['version'] as core.String
            : null,
      );