toJson method
Converts this object to TDLib JSON.
Implementation
@override
Map<String, dynamic> toJson() => {
'@type': CONSTRUCTOR,
'question': question.toJson(),
'options': [for (final e in options) e.toJson()],
'description': description?.toJson(),
'media': media?.toJson(),
'is_anonymous': isAnonymous,
'allows_multiple_answers': allowsMultipleAnswers,
'allows_revoting': allowsRevoting,
'members_only': membersOnly,
'country_codes': countryCodes,
'shuffle_options': shuffleOptions,
'hide_results_until_closes': hideResultsUntilCloses,
'type': type.toJson(),
'open_period': openPeriod,
'close_date': closeDate,
'is_closed': isClosed,
};