fromJson method Null safety

DocumentReaderTextField? fromJson(
  1. dynamic jsonObject
)

Implementation

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

  result.fieldType = jsonObject["fieldType"];
  result.lcid = jsonObject["lcid"];
  result.status = jsonObject["status"];
  result.lcidName = jsonObject["lcidName"];
  result.fieldName = jsonObject["fieldName"];
  result.value = DocumentReaderValue.fromJson(jsonObject["value"]);
  if (jsonObject["values"] != null)
    for (var item in jsonObject["values"])
      result.values.add(DocumentReaderValue.fromJson(item));

  return result;
}