fromJson static method

TextResult? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._status = CheckResult.getByValue(jsonObject["status"])!;
  result._comparisonStatus =
      CheckResult.getByValue(jsonObject["comparisonStatus"])!;
  result._validityStatus =
      CheckResult.getByValue(jsonObject["validityStatus"])!;
  for (var item in jsonObject["availableSourceList"]) {
    result._availableSourceList.addSafe(TextSource.fromJson(item));
  }
  for (var item in jsonObject["fields"]) {
    result._fields.addSafe(TextField.fromJson(item));
  }
  return result;
}