ModWheelDatePicker.yearOnly constructor

const ModWheelDatePicker.yearOnly({
  1. Key? key,
  2. DateTime? initialDate,
  3. ModWheelDatePickerController? controller,
  4. ValueChanged<DateTime>? onDateChanged,
  5. int minYear = 1900,
  6. int maxYear = 2100,
  7. double height = 150,
  8. double? width,
  9. TextStyle? selectedStyle,
  10. TextStyle? unselectedStyle,
  11. Color? backgroundColor,
  12. BorderRadius? borderRadius,
  13. bool enableHapticFeedback = true,
  14. ModHapticFeedbackType hapticFeedbackType = ModHapticFeedbackType.vibrate,
  15. double itemSize = 40,
  16. bool enableAnimation = true,
  17. Duration animationDuration = const Duration(milliseconds: 500),
})

Creates a date picker with year wheel only.

Implementation

const ModWheelDatePicker.yearOnly({
  super.key,
  this.initialDate,
  this.controller,
  this.onDateChanged,
  this.minYear = 1900,
  this.maxYear = 2100,
  this.height = 150,
  this.width,
  this.selectedStyle,
  this.unselectedStyle,
  this.backgroundColor,
  this.borderRadius,
  this.enableHapticFeedback = true,
  this.hapticFeedbackType = ModHapticFeedbackType.vibrate,
  this.itemSize = 40,
  this.enableAnimation = true,
  this.animationDuration = const Duration(milliseconds: 500),
})  : type = ModWheelDatePickerType.yearOnly,
      showDividers = false,
      dividerColor = null,
      useShortMonthNames = false,
      customMonthNames = null,
      dayMonthYearOrder = true;