DayPicker constructor

DayPicker({Key key, @required DateTime selectedDate, @required DateTime currentDate, @required ValueChanged<DateTime> onChanged, @required DateTime firstDate, @required DateTime lastDate, @required DateTime displayedMonth, SelectableDayPredicate selectableDayPredicate })

Creates a day picker.

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

Implementation

DayPicker({
  Key key,
  @required this.selectedDate,
  @required this.currentDate,
  @required this.onChanged,
  @required this.firstDate,
  @required this.lastDate,
  @required this.displayedMonth,
  this.selectableDayPredicate,
}) : assert(selectedDate != null),
     assert(currentDate != null),
     assert(onChanged != null),
     assert(displayedMonth != null),
     assert(!firstDate.isAfter(lastDate)),
     assert(selectedDate.isAfter(firstDate) || selectedDate.isAtSameMomentAs(firstDate)),
     super(key: key);