fromJson static method

Position? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._docFormat = DocFormat.getByValue(jsonObject["docFormat"])!;
  result._width = jsonObject["width"];
  result._height = jsonObject["height"];
  result._dpi = jsonObject["dpi"];
  result._pageIndex = jsonObject["pageIndex"];
  result._inverse = jsonObject["inverse"];
  result._perspectiveTr = jsonObject["perspectiveTr"];
  result._objArea = jsonObject["objArea"];
  result._objIntAngleDev = jsonObject["objIntAngleDev"];
  result._resultStatus = CheckResult.getByValue(jsonObject["resultStatus"])!;
  result._angle = _toDouble(jsonObject["angle"])!;
  result._center = Coordinate.fromJson(jsonObject["center"]);
  result._leftTop = Coordinate.fromJson(jsonObject["leftTop"]);
  result._leftBottom = Coordinate.fromJson(jsonObject["leftBottom"]);
  result._rightTop = Coordinate.fromJson(jsonObject["rightTop"]);
  result._rightBottom = Coordinate.fromJson(jsonObject["rightBottom"]);

  return result;
}