calculateAge function
Implementation
int calculateAge(DateTime birthDate) {
final now = DateTime.now();
int age = now.year - birthDate.year;
if (now.month < birthDate.month ||
(now.month == birthDate.month && now.day < birthDate.day)) {
age--;
}
// return age;
return age;
}