age property
int
get
age
Age in full years.
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 < 0 ? 0 : years;
}