toJson method
Converts this object to TDLib JSON.
Implementation
@override
Map<String, dynamic> toJson() => {
'@type': CONSTRUCTOR,
'id': id.toString(),
'question': question.toJson(),
'options': [for (final e in options) e.toJson()],
'total_voter_count': totalVoterCount,
'recent_voter_ids': [for (final e in recentVoterIds) e.toJson()],
'can_get_voters': canGetVoters,
'can_see_results': canSeeResults,
'is_anonymous': isAnonymous,
'allows_multiple_answers': allowsMultipleAnswers,
'allows_revoting': allowsRevoting,
'members_only': membersOnly,
'country_codes': countryCodes,
'option_order': optionOrder,
'type': type.toJson(),
'open_period': openPeriod,
'close_date': closeDate,
'is_closed': isClosed,
'vote_restriction_reason': voteRestrictionReason?.toJson(),
};