Contest.fromJson constructor
Contest.fromJson(
- Map json_
Implementation
Contest.fromJson(core.Map json_)
: this(
ballotPlacement: json_.containsKey('ballotPlacement')
? json_['ballotPlacement'] as core.String
: null,
ballotTitle: json_.containsKey('ballotTitle')
? json_['ballotTitle'] as core.String
: null,
candidates: json_.containsKey('candidates')
? (json_['candidates'] as core.List)
.map((value) => Candidate.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
district: json_.containsKey('district')
? ElectoralDistrict.fromJson(
json_['district'] as core.Map<core.String, core.dynamic>)
: null,
electorateSpecifications:
json_.containsKey('electorateSpecifications')
? json_['electorateSpecifications'] as core.String
: null,
level: json_.containsKey('level')
? (json_['level'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
numberElected: json_.containsKey('numberElected')
? json_['numberElected'] as core.String
: null,
numberVotingFor: json_.containsKey('numberVotingFor')
? json_['numberVotingFor'] as core.String
: null,
office: json_.containsKey('office')
? json_['office'] as core.String
: null,
primaryParties: json_.containsKey('primaryParties')
? (json_['primaryParties'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
referendumBallotResponses:
json_.containsKey('referendumBallotResponses')
? (json_['referendumBallotResponses'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
referendumBrief: json_.containsKey('referendumBrief')
? json_['referendumBrief'] as core.String
: null,
referendumConStatement: json_.containsKey('referendumConStatement')
? json_['referendumConStatement'] as core.String
: null,
referendumEffectOfAbstain:
json_.containsKey('referendumEffectOfAbstain')
? json_['referendumEffectOfAbstain'] as core.String
: null,
referendumPassageThreshold:
json_.containsKey('referendumPassageThreshold')
? json_['referendumPassageThreshold'] as core.String
: null,
referendumProStatement: json_.containsKey('referendumProStatement')
? json_['referendumProStatement'] as core.String
: null,
referendumSubtitle: json_.containsKey('referendumSubtitle')
? json_['referendumSubtitle'] as core.String
: null,
referendumText: json_.containsKey('referendumText')
? json_['referendumText'] as core.String
: null,
referendumTitle: json_.containsKey('referendumTitle')
? json_['referendumTitle'] as core.String
: null,
referendumUrl: json_.containsKey('referendumUrl')
? json_['referendumUrl'] as core.String
: null,
roles: json_.containsKey('roles')
? (json_['roles'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
sources: json_.containsKey('sources')
? (json_['sources'] as core.List)
.map((value) => Source.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
special: json_.containsKey('special')
? json_['special'] as core.String
: null,
type: json_.containsKey('type') ? json_['type'] as core.String : null,
);