fromJson static method

AgeStatus? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._threshold = jsonObject["threshold"];
  result._overThreshold =
      CheckResult.getByValue(jsonObject["overThreshold"])!;
  result._over18 = CheckResult.getByValue(jsonObject["over18"])!;
  result._over21 = CheckResult.getByValue(jsonObject["over21"])!;
  result._over25 = CheckResult.getByValue(jsonObject["over25"])!;
  result._over65 = CheckResult.getByValue(jsonObject["over65"])!;

  return result;
}