ModerationCategories.fromJson constructor

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

Implementation

factory ModerationCategories.fromJson(Map<String, dynamic> json) {
  return ModerationCategories(
    hate: json['hate'] as bool,
    hateThreatening: json['hate/threatening'] as bool,
    harassment: json['harassment'] as bool,
    harassmentThreatening: json['harassment/threatening'] as bool,
    selfHarm: json['self-harm'] as bool,
    selfHarmIntent: json['self-harm/intent'] as bool,
    selfHarmInstructions: json['self-harm/instructions'] as bool,
    sexual: json['sexual'] as bool,
    sexualMinors: json['sexual/minors'] as bool,
    violence: json['violence'] as bool,
    violenceGraphic: json['violence/graphic'] as bool,
  );
}