setMonths method
Implementation
List<Month> setMonths(int year) {
final months = <Month>[];
var id = 0;
for (var i = 1; i <= 12; ++i) {
id = ++id;
months.add(
Month(
id,
DateFormat('MMM').format(DateTime(year, i)),
DateTime(year, i).month,
setDays(year, i),
false,
isCurrentMonth(year, i),
),
);
}
return months;
}