isAgeEqualTo method

dynamic isAgeEqualTo(
  1. int age
)

Check if DateTime is equal to a certain age

Implementation

isAgeEqualTo(int age) {
  if (this == null) return null;
  int? ageCheck = toAge();
  if (ageCheck == null) return null;
  return ageCheck == age;
}