from static method

List<int> from(
  1. int from
)

Generate dates from a year

Implementation

static List<int> from(int from) {
  List<int> years = [];
  int to = DateTime.now().year;
  for (int i = from; i < to; i++) {
    years.insert(0, i);
  }
  return years;
}