isAgeYounger method

bool? isAgeYounger(
  1. int age
)

Check if DateTime is younger than a certain age

Implementation

bool? isAgeYounger(int age) {
  if (this == null) return null;
  int? ageCheck = toAge();
  if (ageCheck == null) return null;
  return ageCheck < age;
}