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 a DatePicker.
Source
YearPicker({
Key key,
@required this.selectedDate,
@required this.onChanged,
@required this.firstDate,
@required this.lastDate
}) : super(key: key) {
assert(selectedDate != null);
assert(onChanged != null);
assert(lastDate.isAfter(firstDate));
}