SolarYearPicker constructor

SolarYearPicker({
  1. Key? key,
  2. required DateTime selectedDate,
  3. required ValueChanged<DateTime> onChanged,
  4. required DateTime firstDate,
  5. required DateTime lastDate,
  6. bool isPersian = true,
  7. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
})

Creates a year picker.

The selectedDate and onChanged arguments must not be null. The lastDate must be after the firstDate.

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

Implementation

SolarYearPicker({
  Key? key,
  required this.selectedDate,
  required this.onChanged,
  required this.firstDate,
  required this.lastDate,
  this.isPersian = true,
  this.dragStartBehavior = DragStartBehavior.start,
})  : assert(!firstDate.isAfter(lastDate)),
      super(key: key);