Environment.fromJson constructor Null safety

Environment.fromJson(
  1. Map _json
)

Implementation

Environment.fromJson(core.Map _json)
    : this(
        config: _json.containsKey('config')
            ? EnvironmentConfig.fromJson(
                _json['config'] as core.Map<core.String, core.dynamic>)
            : null,
        createTime: _json.containsKey('createTime')
            ? _json['createTime'] 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,
        state:
            _json.containsKey('state') ? _json['state'] as core.String : null,
        updateTime: _json.containsKey('updateTime')
            ? _json['updateTime'] as core.String
            : null,
        uuid: _json.containsKey('uuid') ? _json['uuid'] as core.String : null,
      );