toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return <String, dynamic>{
    'id': id,
    'question': question,
    'anonymous': anonymous,
    'hideVotes': hideVotes,
    'createdBy': createdBy,
    'options': options.map((x) => x.toMap()).toList(),
    'voted': voted,
  };
}