ElectionsQueryResponse.fromJson constructor Null safety

ElectionsQueryResponse.fromJson(
  1. Map _json
)

Implementation

ElectionsQueryResponse.fromJson(core.Map _json)
    : this(
        elections: _json.containsKey('elections')
            ? (_json['elections'] as core.List)
                .map((value) => Election.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        kind: _json.containsKey('kind') ? _json['kind'] as core.String : null,
      );