fromMap static method
override
Construct from Map.
Implementation
static PollOption? fromMap(Map<String, dynamic>? _map) {
if (_map == null) return null;
var _ = _map["@type"];
if (_ != CONSTRUCTOR) return null;
var extra = _map['@extra'];
var clientId = _map['@clientId'];
var text = _map['text']! as String;
var voter_count = _map['voter_count']! as int;
var vote_percentage = _map['vote_percentage']! as int;
var is_chosen = _map['is_chosen']! as bool;
var is_being_chosen = _map['is_being_chosen']! as bool;
return PollOption(
extra: extra,
clientId: clientId,
text: text,
voter_count: voter_count,
vote_percentage: vote_percentage,
is_chosen: is_chosen,
is_being_chosen: is_being_chosen,
);
}