getDatesList method
Implementation
List<DateTime> getDatesList() {
List<DateTime> dates = [];
int count = getEndDate().year - getStartDate().year;
for (var i = 0; i <= count; i += getInterval()) {
var year = getStartDate().year + i;
for (var j = 0; j < getByMonth().length; ++j) {
var month = getByMonth()[j];
for (var j = 0; j < getByMonthDay().length; ++j) {
var day = getByMonthDay()[j];
dates.add(DateTime(year, month, day));
}
for (var j = 0; j < getByDayName().length; ++j) {
var day = getByDayName()[j];
dates.addAll(getDatesByDay(year, month, day));
}
}
}
return dates;
}