This function receives a parameter of type date that is responsible for returning the age
int age(DateTime? date) {
if (date == null) return 0; // Valor predeterminado para evitar errores
final now = DateTime.now();
final difference = now.difference(date);
return (difference.inDays / 365).floor();
}