daysUntil method

List<DateTime> daysUntil(
  1. DateTime other
)

Implementation

List<DateTime> daysUntil(DateTime other) {
  final days = <DateTime>[];
  var current = startOfDay();
  final end = other.startOfDay();
  while (!current.isAfter(end)) {
    days.add(current);
    current = current.addDays(1);
  }
  return days;
}