JYearPicker constructor
JYearPicker({
- Key? key,
- HijriDate? currentDate,
- required HijriDate firstDate,
- required HijriDate lastDate,
- HijriDate? initialDate,
- required HijriDate selectedDate,
- required ValueChanged<
HijriDate> onChanged, - DragStartBehavior dragStartBehavior = DragStartBehavior.start,
Creates a year picker.
The firstDate
, lastDate
, selectedDate
, and onChanged
arguments must be non-null. The lastDate
must be after the firstDate
.
Implementation
JYearPicker({
super.key,
HijriDate? currentDate,
required this.firstDate,
required this.lastDate,
HijriDate? initialDate,
required this.selectedDate,
required this.onChanged,
this.dragStartBehavior = DragStartBehavior.start,
}) : assert(!firstDate.dateTime.isAfter(lastDate.dateTime)),
currentDate = currentDate ?? HijriDate.now(),
initialDate = initialDate ?? selectedDate;