fromJson static method

Value? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._pageIndex = jsonObject["pageIndex"];
  result._sourceType = ResultType.getByValue(jsonObject["sourceType"])!;
  result._probability = jsonObject["probability"];
  result._value = jsonObject["value"];
  result._originalValue = jsonObject["originalValue"];
  result._boundRect = Rect.fromJson(jsonObject["boundRect"]);
  for (var item in jsonObject["originalSymbols"]) {
    result._originalSymbols.addSafe(Symbol.fromJson(item));
  }
  result._rfidOrigin = RFIDOrigin.fromJson(jsonObject["rfidOrigin"]);

  return result;
}