fromJson static method

MatchFacesDetectionFace? fromJson(
  1. dynamic jsonObject
)

Implementation

static MatchFacesDetectionFace? fromJson(jsonObject) {
  if (jsonObject == null) return null;
  var result = new MatchFacesDetectionFace();

  result.faceIndex = jsonObject["faceIndex"];
  result.rotationAngle = jsonObject["rotationAngle"] == null
      ? null
      : jsonObject["rotationAngle"].toDouble();
  if (jsonObject["landmarks"] != null)
    for (var item in jsonObject["landmarks"])
      result.landmarks.add(Point.fromJson(item));
  result.faceRect = Rect.fromJson(jsonObject["faceRect"]);
  result.originalRect = Rect.fromJson(jsonObject["originalRect"]);
  result.crop = jsonObject["crop"];

  return result;
}