age property

int get age

Full years from this birth date until today. birthDate.age

Implementation

int get age {
  final DateTime now = DateTime.now();
  int years = now.year - year;
  if (now.month < month || (now.month == month && now.day < day)) years--;
  return years;
}