fromJson static method

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

Implementation

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

  result._code = DetectFacesErrorCode.getByValue(jsonObject["code"])!;
  result._message = jsonObject["message"] ?? "";
  result._underlyingError =
      DetectFacesBackendException.fromJson(jsonObject["underlyingError"]);

  return result;
}