MonthPicker constructor

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

Creates a month picker.

Rarely used directly. Instead, typically used as part of the dialog shown by showDatePicker.

Implementation

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