GeminiTextResponseModel.fromJson constructor
Convert JSON data to class instance
Implementation
GeminiTextResponseModel.fromJson(Map<String, dynamic> json) {
if (json['candidates'] != null) {
candidates = <Candidates>[];
json['candidates'].forEach((v) {
candidates!.add(Candidates.fromJson(v));
});
}
promptFeedback = json['promptFeedback'] != null
? PromptFeedback.fromJson(json['promptFeedback'])
: null;
}