fromJson static method

GraphicField? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._sourceType = ResultType.getByValue(jsonObject["sourceType"])!;
  result._fieldType = GraphicFieldType.getByValue(jsonObject["fieldType"])!;
  result._light = Lights.getByValue(jsonObject["light"])!;
  result._pageIndex = jsonObject["pageIndex"];
  result._originalPageIndex = jsonObject["originalPageIndex"];
  result._fieldName = jsonObject["fieldName"];
  result._lightName = jsonObject["lightName"];
  result._value = _bytesFromBase64(jsonObject["value"]);
  result._fieldRect = Rect.fromJson(jsonObject["fieldRect"]);

  return result;
}