toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'choices': choices.map((choice) => choice.toJson()).toList(),
    'created': createdAt.millisecondsSinceEpoch,
  };
}