VoterInfoResponse.fromJson constructor
VoterInfoResponse.fromJson(
- Map json_
Implementation
VoterInfoResponse.fromJson(core.Map json_)
: this(
contests: json_.containsKey('contests')
? (json_['contests'] as core.List)
.map((value) => Contest.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
dropOffLocations: json_.containsKey('dropOffLocations')
? (json_['dropOffLocations'] as core.List)
.map((value) => PollingLocation.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
earlyVoteSites: json_.containsKey('earlyVoteSites')
? (json_['earlyVoteSites'] as core.List)
.map((value) => PollingLocation.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
election: json_.containsKey('election')
? Election.fromJson(
json_['election'] as core.Map<core.String, core.dynamic>)
: null,
kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
mailOnly: json_.containsKey('mailOnly')
? json_['mailOnly'] as core.bool
: null,
normalizedInput: json_.containsKey('normalizedInput')
? SimpleAddressType.fromJson(json_['normalizedInput']
as core.Map<core.String, core.dynamic>)
: null,
otherElections: json_.containsKey('otherElections')
? (json_['otherElections'] as core.List)
.map((value) => Election.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
pollingLocations: json_.containsKey('pollingLocations')
? (json_['pollingLocations'] as core.List)
.map((value) => PollingLocation.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
precinctId: json_.containsKey('precinctId')
? json_['precinctId'] as core.String
: null,
precincts: json_.containsKey('precincts')
? (json_['precincts'] as core.List)
.map((value) => Precinct.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
state: json_.containsKey('state')
? (json_['state'] as core.List)
.map((value) => AdministrationRegion.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);