toJson method

  1. @override
Map<String, dynamic> toJson([
  1. dynamic extra
])
override

Implementation

@override
Map<String, dynamic> toJson([dynamic extra]) {
  return {
    "@type": CONSTRUCTOR,
    "id": id,
    "question": question,
    "options": options.map((i) => i.toJson()).toList(),
    "total_voter_count": totalVoterCount,
    "recent_voter_ids": recentVoterIds.map((i) => i.toJson()).toList(),
    "is_anonymous": isAnonymous,
    "type": type.toJson(),
    "open_period": openPeriod,
    "close_date": closeDate,
    "is_closed": isClosed,
  };
}