setYear method
Sets only the year value.
Implementation
void setYear(int newYear) {
year.value = newYear;
final daysInMonth = DateTime(newYear, month.value + 1, 0).day;
day.value = day.value.clamp(1, daysInMonth);
}
Sets only the year value.
void setYear(int newYear) {
year.value = newYear;
final daysInMonth = DateTime(newYear, month.value + 1, 0).day;
day.value = day.value.clamp(1, daysInMonth);
}