create static method
Poll
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "poll",
- String? name,
- List<
PollOption> ? options, - num? selectableoptionscount,
- ContextInfo? contextinfo,
override
Generated
Implementation
static Poll create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "poll",
String? name,
List<PollOption>? options,
num? selectableoptionscount,
ContextInfo? contextinfo,
}) {
// Poll poll = Poll({
final Map poll_data_create_json = {
"@type": special_type,
"name": name,
"options": (options != null) ? options.toJson() : null,
"selectableOptionsCount": selectableoptionscount,
"contextInfo": (contextinfo != null) ? contextinfo.toJson() : null,
};
poll_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (poll_data_create_json.containsKey(key) == false) {
poll_data_create_json[key] = value;
}
});
}
return Poll(poll_data_create_json);
}