setYears method

List<Year> setYears(
  1. int fromYear,
  2. int toYear
)

Implementation

List<Year> setYears(int fromYear, int toYear) {
  final years = <Year>[];
  var id = 0;
  for (var i = fromYear; i < toYear; ++i) {
    id = id++;
    years.add(Year(id, i, setMonths(i), false, isCurrentYear(i)));
  }
  return years;
}