InputMessagePoll.fromJson constructor
Parses a InputMessagePoll from TDLib JSON.
Implementation
factory InputMessagePoll.fromJson(Map<String, dynamic> json) =>
InputMessagePoll(
question: _readObject(json['question'], FormattedText.fromJson),
options: _readList<InputPollOption>(
json['options'],
(e) => _readObject(e, InputPollOption.fromJson),
),
description: _readOptional(json['description'], FormattedText.fromJson),
media: _readOptional(json['media'], InputPollMedia.fromJson),
isAnonymous: _readBool(json['is_anonymous']),
allowsMultipleAnswers: _readBool(json['allows_multiple_answers']),
allowsRevoting: _readBool(json['allows_revoting']),
membersOnly: _readBool(json['members_only']),
countryCodes: _readList<String>(json['country_codes'], _readString),
shuffleOptions: _readBool(json['shuffle_options']),
hideResultsUntilCloses: _readBool(json['hide_results_until_closes']),
type: _readObject(json['type'], InputPollType.fromJson),
openPeriod: _readInt(json['open_period']),
closeDate: _readInt(json['close_date']),
isClosed: _readBool(json['is_closed']),
);