SafetySettings.fromJson constructor
Implementation
factory SafetySettings.fromJson(Map<String, dynamic> json) {
return SafetySettings(
category: SafetyCategory.values
.firstWhere((e) => e.toString() == '${json['category']}'),
threshold: SafetyThreshold.values
.firstWhere((e) => e.toString() == '${json['threshold']}'),
);
}