Hub.fromJson constructor

Hub.fromJson(
  1. Map _json
)

Implementation

Hub.fromJson(core.Map _json)
    : this(
        createTime: _json.containsKey('createTime')
            ? _json['createTime'] as core.String
            : null,
        description: _json.containsKey('description')
            ? _json['description'] as core.String
            : null,
        labels: _json.containsKey('labels')
            ? (_json['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        name: _json.containsKey('name') ? _json['name'] as core.String : null,
        spokes: _json.containsKey('spokes')
            ? (_json['spokes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        state:
            _json.containsKey('state') ? _json['state'] as core.String : null,
        uniqueId: _json.containsKey('uniqueId')
            ? _json['uniqueId'] as core.String
            : null,
        updateTime: _json.containsKey('updateTime')
            ? _json['updateTime'] as core.String
            : null,
      );