toJson method
Converts an object to JSON.
Implementation
@override
Map<String, dynamic> toJson() {
final returnValue = <String, dynamic>{
'\$hash': '966e2dbf',
'\$name': 'Poll',
'id': id,
'flags': flags,
'closed': closed,
'publicVoters': publicVoters,
'multipleChoice': multipleChoice,
'quiz': quiz,
'openAnswers': openAnswers,
'revotingDisabled': revotingDisabled,
'shuffleAnswers': shuffleAnswers,
'hideResultsUntilClose': hideResultsUntilClose,
'creator': creator,
'subscribersOnly': subscribersOnly,
'question': question,
'answers': answers,
'closePeriod': closePeriod,
'closeDate': closeDate?.toIso8601String(),
'countriesIso2': countriesIso2,
'hash': hash,
};
// Finished toJson.
return returnValue;
}