DateRange constructor

DateRange(
  1. date startDate, [
  2. date? endDate
])

Creates a new instance of the DateRange class with the specified start and end dates.

Implementation

DateRange(date startDate, [date? endDate]) {
  _dates = [startDate, endDate ?? startDate];
}