fromJson static method

TextField? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._fieldType = FieldType.getByValue(jsonObject["fieldType"])!;
  result._lcid = LCID.getByValue(jsonObject["lcid"])!;
  result._status = CheckResult.getByValue(jsonObject["status"])!;
  result._comparisonStatus =
      CheckResult.getByValue(jsonObject["comparisonStatus"])!;
  result._validityStatus =
      CheckResult.getByValue(jsonObject["validityStatus"])!;
  result._lcidName = jsonObject["lcidName"];
  result._fieldName = jsonObject["fieldName"];
  result._value = jsonObject["value"];
  result._getValue = Value.fromJson(jsonObject["getValue"]);
  for (var item in jsonObject["values"]) {
    result._values.addSafe(Value.fromJson(item));
  }
  for (var item in jsonObject["comparisonList"]) {
    result._comparisonList.addSafe(Comparison.fromJson(item));
  }
  for (var item in jsonObject["validityList"]) {
    result._validityList.addSafe(Validity.fromJson(item));
  }
  return result;
}