fromJson static method

ResultsStatus? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._overallStatus =
      CheckResult.getByValue(jsonObject["overallStatus"])!;
  result._optical = CheckResult.getByValue(jsonObject["optical"])!;
  result._detailsOptical =
      OpticalStatus.fromJson(jsonObject["detailsOptical"])!;
  result._rfid = CheckResult.getByValue(jsonObject["rfid"])!;
  result._detailsRFID = RFIDStatus.fromJson(jsonObject["detailsRFID"])!;
  result._portrait = CheckResult.getByValue(jsonObject["portrait"])!;
  result._stopList = CheckResult.getByValue(jsonObject["stopList"])!;

  return result;
}