fromJson method Null safety

DocumentReaderBarcodeResult? fromJson(
  1. dynamic jsonObject
)

Implementation

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

  if (jsonObject["fields"] != null)
    for (var item in jsonObject["fields"])
      result.fields.add(DocumentReaderBarcodeField.fromJson(item));

  return result;
}