YearPicker constructor
- Key? key,
- DateTime? currentDate,
- required DateTime firstDate,
- required DateTime lastDate,
- @Deprecated('This parameter has no effect and can be removed. Previously it controlled ' 'the month that was used in "onChanged" when a new year was selected, but ' 'now that role is filled by "selectedDate" instead. ' 'This feature was deprecated after v3.13.0-0.3.pre.') DateTime? initialDate,
- required DateTime? selectedDate,
- required ValueChanged<
DateTime> onChanged, - DragStartBehavior dragStartBehavior = DragStartBehavior.start,
Creates a year picker.
Implementation
YearPicker({
super.key,
DateTime? currentDate,
required this.firstDate,
required this.lastDate,
@Deprecated(
'This parameter has no effect and can be removed. Previously it controlled '
'the month that was used in "onChanged" when a new year was selected, but '
'now that role is filled by "selectedDate" instead. '
'This feature was deprecated after v3.13.0-0.3.pre.'
)
DateTime? initialDate,
required this.selectedDate,
required this.onChanged,
this.dragStartBehavior = DragStartBehavior.start,
}) : assert(!firstDate.isAfter(lastDate)),
currentDate = DateUtils.dateOnly(currentDate ?? DateTime.now());