toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  List<Map<String, dynamic>> localCandidates = [];
  for (var candidate in candidates) {
    localCandidates.add(candidate.toJson());
  }
  return {'candidates': candidates, 'promptFeedback': promptFeedback};
}