getDatesByDayAndPosition method
Implementation
List<DateTime> getDatesByDayAndPosition(int year, int month, String day) {
String daysPositions = data['BYSETPOS'] ?? '';
List<String> positions = daysPositions.split(',');
Year y = years!.firstWhere((element) => element.value == year);
Month m = y.months.firstWhere((element) => element.value == month);
List<Day> d = [];
List<DateTime> dates = [];
for (var i = 0; i < positions.length; ++i) {
var position = positions[i];
dates.add(DateTime(year, month, m.days.firstWhere((element) => element.value == int.parse(position)).value));
}
return dates;
}