ModWheelSlider constructor

const ModWheelSlider({
  1. Key? key,
  2. double horizontalListHeight = 50,
  3. double horizontalListWidth = double.infinity,
  4. double verticalListHeight = 400.0,
  5. double verticalListWidth = 50.0,
  6. required int totalCount,
  7. required num initValue,
  8. required dynamic onValueChanged(
    1. dynamic
    ),
  9. double itemSize = 10,
  10. double perspective = 0.0007,
  11. bool isInfinite = true,
  12. bool horizontal = true,
  13. double squeeze = 1.0,
  14. Color? lineColor,
  15. Color pointerColor = Colors.black,
  16. double pointerHeight = 50.0,
  17. double pointerWidth = 3.0,
  18. Widget? background,
  19. bool enableHapticFeedback = true,
  20. ModHapticFeedbackType hapticFeedbackType = ModHapticFeedbackType.vibrate,
  21. bool showPointer = true,
  22. Widget? customPointer,
  23. ScrollPhysics? scrollPhysics,
  24. bool allowPointerTappable = true,
  25. num interval = 1,
  26. bool enableAnimation = true,
  27. Duration animationDuration = const Duration(seconds: 1),
  28. Curve animationType = Curves.easeIn,
  29. FixedExtentScrollController? controller,
  30. ModWheelSliderController? sliderController,
})

Constructs a ModWheelSlider with line-based UI.

Implementation

const ModWheelSlider({
  super.key,
  this.horizontalListHeight = 50,
  this.horizontalListWidth = double.infinity,
  this.verticalListHeight = 400.0,
  this.verticalListWidth = 50.0,
  required this.totalCount,
  required this.initValue,
  required this.onValueChanged,
  this.itemSize = 10,
  this.perspective = 0.0007,
  this.isInfinite = true,
  this.horizontal = true,
  this.squeeze = 1.0,
  this.lineColor,
  this.pointerColor = Colors.black,
  this.pointerHeight = 50.0,
  this.pointerWidth = 3.0,
  this.background,
  this.enableHapticFeedback = true,
  this.hapticFeedbackType = ModHapticFeedbackType.vibrate,
  this.showPointer = true,
  this.customPointer,
  this.scrollPhysics,
  this.allowPointerTappable = true,
  this.interval = 1,
  this.enableAnimation = true,
  this.animationDuration = const Duration(seconds: 1),
  this.animationType = Curves.easeIn,
  this.controller,
  this.sliderController,
})  : assert(perspective <= 0.01, 'perspective must be <= 0.01'),
      _sliderType = _WheelSliderType.line,
      selectedNumberStyle = null,
      unSelectedNumberStyle = null,
      selectedNumberWidth = null,
      children = null,
      currentIndex = null;