RecognizeCelebritiesResponse.fromJson constructor

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

Implementation

factory RecognizeCelebritiesResponse.fromJson(Map<String, dynamic> json) {
  return RecognizeCelebritiesResponse(
    celebrityFaces: (json['CelebrityFaces'] as List?)
        ?.whereNotNull()
        .map((e) => Celebrity.fromJson(e as Map<String, dynamic>))
        .toList(),
    orientationCorrection:
        (json['OrientationCorrection'] as String?)?.toOrientationCorrection(),
    unrecognizedFaces: (json['UnrecognizedFaces'] as List?)
        ?.whereNotNull()
        .map((e) => ComparedFace.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}