SolarDayPicker constructor

SolarDayPicker({
  1. Key? key,
  2. required DateTime selectedDate,
  3. required DateTime currentDate,
  4. required ValueChanged<DateTime> onChanged,
  5. required DateTime firstDate,
  6. required DateTime lastDate,
  7. required DateTime displayedMonth,
  8. SelectableDayPredicate? selectableDayPredicate,
  9. bool isPersian = true,
  10. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
})

Creates a day picker.

Rarely used directly. Instead, typically used as part of a SolarMonthPicker.

Implementation

SolarDayPicker({
  Key? key,
  required this.selectedDate,
  required this.currentDate,
  required this.onChanged,
  required this.firstDate,
  required this.lastDate,
  required this.displayedMonth,
  this.selectableDayPredicate,
  this.isPersian = true,
  this.dragStartBehavior = DragStartBehavior.start,
})  : assert(!firstDate.isAfter(lastDate)),
      assert(selectedDate.isAfter(firstDate) ||
          selectedDate.isAtSameMomentAs(firstDate)),
      super(key: key);