IndividualVoteFromJson.fromFrenchNationalAssemblyJson constructor
IndividualVoteFromJson.fromFrenchNationalAssemblyJson()
Mapping from JSON
Implementation
IndividualVoteFromJson.fromFrenchNationalAssemblyJson(
Map<String, dynamic> json, String voteReceived) {
this.acteurRef = json['acteurRef'];
this.mandatRef = json['mandatRef'];
this.parDelegation = json['parDelegation'] == "false" ? false : true;
if (voteReceived == "pours") {
votedFor = true;
} else {
votedFor = false;
}
if (voteReceived == "contres") {
votedAgainst = true;
} else {
votedAgainst = false;
}
if (voteReceived == "abstentions") {
votedAbstention = true;
} else {
votedAbstention = false;
}
if (voteReceived == "nonVotants") {
didNotVote = true;
} else {
didNotVote = false;
}
}