create static method
InputMessagePoll
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "inputMessagePoll",
- String special_return_type = "inputMessageContent",
- FormattedText? question,
- List<
FormattedText> ? options, - bool? is_anonymous,
- PollType? type,
- num? open_period,
- num? close_date,
- bool? is_closed,
override
Generate By General Universe Script Dont edit by hand or anything manual
Implementation
static InputMessagePoll create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "inputMessagePoll",
String special_return_type = "inputMessageContent",
FormattedText? question,
List<FormattedText>? options,
bool? is_anonymous,
PollType? type,
num? open_period,
num? close_date,
bool? is_closed,
}) {
// InputMessagePoll inputMessagePoll = InputMessagePoll({
final Map inputMessagePoll_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"question": (question != null) ? question.toJson() : null,
"options": (options != null) ? options.toJson() : null,
"is_anonymous": is_anonymous,
"type": (type != null) ? type.toJson() : null,
"open_period": open_period,
"close_date": close_date,
"is_closed": is_closed,
};
inputMessagePoll_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (inputMessagePoll_data_create_json.containsKey(key) == false) {
inputMessagePoll_data_create_json[key] = value;
}
});
}
return InputMessagePoll(inputMessagePoll_data_create_json);
}