Task.fromJson constructor Null safety

Task.fromJson(
  1. Map _json
)

Implementation

Task.fromJson(core.Map _json)
    : this(
        completed: _json.containsKey('completed')
            ? _json['completed'] as core.String
            : null,
        deleted: _json.containsKey('deleted')
            ? _json['deleted'] as core.bool
            : null,
        due: _json.containsKey('due') ? _json['due'] as core.String : null,
        etag: _json.containsKey('etag') ? _json['etag'] as core.String : null,
        hidden:
            _json.containsKey('hidden') ? _json['hidden'] as core.bool : null,
        id: _json.containsKey('id') ? _json['id'] as core.String : null,
        kind: _json.containsKey('kind') ? _json['kind'] as core.String : null,
        links: _json.containsKey('links')
            ? (_json['links'] as core.List)
                .map((value) => TaskLinks.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        notes:
            _json.containsKey('notes') ? _json['notes'] as core.String : null,
        parent: _json.containsKey('parent')
            ? _json['parent'] as core.String
            : null,
        position: _json.containsKey('position')
            ? _json['position'] as core.String
            : null,
        selfLink: _json.containsKey('selfLink')
            ? _json['selfLink'] as core.String
            : null,
        status: _json.containsKey('status')
            ? _json['status'] as core.String
            : null,
        title:
            _json.containsKey('title') ? _json['title'] as core.String : null,
        updated: _json.containsKey('updated')
            ? _json['updated'] as core.String
            : null,
      );