fromJson static method

  1. @visibleForTesting
SearchPersonDetection? fromJson(
  1. dynamic jsonObject
)

Implementation

@visibleForTesting
static SearchPersonDetection? fromJson(jsonObject) {
  if (jsonObject == null) return null;
  var result = SearchPersonDetection._privateConstructor();

  for (var item in jsonObject["landmarks"]) {
    result._landmarks.add(Point.fromJson(item)!);
  }
  result._rect = Rect.fromJson(jsonObject["rect"])!;
  result._crop = _bytesFromBase64(jsonObject["crop"]);
  result._rotationAngle = _toDouble(jsonObject["rotationAngle"]);

  return result;
}