PollType.fromJson constructor
a PollType return type can be :
Implementation
factory PollType.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case PollTypeRegular.CONSTRUCTOR:
return PollTypeRegular.fromJson(json);
case PollTypeQuiz.CONSTRUCTOR:
return PollTypeQuiz.fromJson(json);
default:
return const PollType();
}
}