Candidates.fromJson constructor

Candidates.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Candidates.fromJson(Map<String, dynamic> json) {
  content =
      json['content'] != null ? Content.fromJson(json['content']) : null;
  finishReason = json['finishReason'];
  index = json['index'];
  if (json['safetyRatings'] != null) {
    safetyRatings = <SafetyRatings>[];
    json['safetyRatings'].forEach((v) {
      safetyRatings!.add(SafetyRatings.fromJson(v));
    });
  }
}