toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = {};
  if (candidates != null) {
    data['candidates'] = candidates?.map((x) => x.toJson()).toList();
  }
  if (promptFeedback != null) {
    data['promptFeedback'] = promptFeedback?.toJson();
  }
  return data;
}