create static method
PollOption
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "pollOption",
- String special_return_type = "pollOption",
- FormattedText? text,
- num? voter_count,
- num? vote_percentage,
- bool? is_chosen,
- bool? is_being_chosen,
override
Generate By General Universe Script Dont edit by hand or anything manual
Implementation
static PollOption create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "pollOption",
String special_return_type = "pollOption",
FormattedText? text,
num? voter_count,
num? vote_percentage,
bool? is_chosen,
bool? is_being_chosen,
}) {
// PollOption pollOption = PollOption({
final Map pollOption_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"text": (text != null) ? text.toJson() : null,
"voter_count": voter_count,
"vote_percentage": vote_percentage,
"is_chosen": is_chosen,
"is_being_chosen": is_being_chosen,
};
pollOption_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (pollOption_data_create_json.containsKey(key) == false) {
pollOption_data_create_json[key] = value;
}
});
}
return PollOption(pollOption_data_create_json);
}