Precinct.fromJson constructor
Precinct.fromJson(
- Map json_
Implementation
Precinct.fromJson(core.Map json_)
: this(
administrationRegionId: json_.containsKey('administrationRegionId')
? json_['administrationRegionId'] as core.String
: null,
contestId: json_.containsKey('contestId')
? (json_['contestId'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
datasetId: json_.containsKey('datasetId')
? json_['datasetId'] as core.String
: null,
earlyVoteSiteId: json_.containsKey('earlyVoteSiteId')
? (json_['earlyVoteSiteId'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
electoralDistrictId: json_.containsKey('electoralDistrictId')
? (json_['electoralDistrictId'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
id: json_.containsKey('id') ? json_['id'] as core.String : null,
mailOnly: json_.containsKey('mailOnly')
? json_['mailOnly'] as core.bool
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
number: json_.containsKey('number')
? json_['number'] as core.String
: null,
ocdId: json_.containsKey('ocdId')
? (json_['ocdId'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
pollingLocationId: json_.containsKey('pollingLocationId')
? (json_['pollingLocationId'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
spatialBoundaryId: json_.containsKey('spatialBoundaryId')
? (json_['spatialBoundaryId'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
splitName: json_.containsKey('splitName')
? json_['splitName'] as core.String
: null,
ward: json_.containsKey('ward') ? json_['ward'] as core.String : null,
);