Poll.fromJSON constructor

Poll.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

Poll.fromJSON(Map<String, dynamic> json)
    : allowMultipleVotes = json['allowMultipleVotes'],
      endDate = json['endDate'],
      totalVotes = json['totalVotes'],
      knownVoters = Utils.createList(
          json['knownVoters'], (jsonMap) => UserVotes.fromJSON(jsonMap)),
      options = Utils.createList(
          json['options'], (jsonMap) => PollOption.fromJSON(jsonMap));