toJson method
Implementation
Map<String, dynamic> toJson() {
final result$data = <String, dynamic>{};
final l$name = name;
result$data['name'] = l$name;
if (_$data.containsKey('content')) {
final l$content = content;
result$data['content'] = l$content;
}
final l$matchLabel = matchLabel;
result$data['matchLabel'] = l$matchLabel.map((e) => e).toList();
final l$type = type;
result$data['type'] = toJson$Enum$VoteItemTypeEnum(l$type);
final l$order = order;
result$data['order'] = l$order;
if (_$data.containsKey('score')) {
final l$score = score;
result$data['score'] = l$score;
}
if (_$data.containsKey('weightMatchLabel')) {
final l$weightMatchLabel = weightMatchLabel;
result$data['weightMatchLabel'] = l$weightMatchLabel;
}
final l$isRandomizeAnswerOrder = isRandomizeAnswerOrder;
result$data['isRandomizeAnswerOrder'] = l$isRandomizeAnswerOrder;
final l$isPublished = isPublished;
result$data['isPublished'] = l$isPublished;
final l$options = options;
result$data['options'] = l$options.map((e) => e?.toJson()).toList();
return result$data;
}