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"];
  if (jsonObject["landmarks"] != null)
    for (var item in jsonObject["landmarks"])
      result.landmarks.add(Point.fromJson(item));
  result.faceRect = Rect.fromJson(jsonObject["faceRect"]);
  result.rotationAngle = jsonObject["rotationAngle"] == null
      ? null
      : jsonObject["rotationAngle"].toDouble();
  result.thumbnail = jsonObject["thumbnail"];

  return result;
}