fromJson static method

  1. @visibleForTesting
SearchPersonImage? fromJson(
  1. dynamic jsonObject
)
override

Implementation

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

  result._similarity = _toDouble(jsonObject["similarity"])!;
  result._distance = _toDouble(jsonObject["distance"])!;
  result._path = jsonObject["path"];
  result._url = jsonObject["url"];
  result._contentType = jsonObject["contentType"];
  result._id = jsonObject["id"];
  result._metadata = jsonObject["metadata"];
  result._createdAt = DateTime.parse(jsonObject["createdAt"]);

  return result;
}