ModWheelSlider.number constructor
const
ModWheelSlider.number({
- Key? key,
- double horizontalListHeight = 50,
- double horizontalListWidth = double.infinity,
- double verticalListHeight = 400.0,
- double verticalListWidth = 50.0,
- required int totalCount,
- required num initValue,
- required dynamic onValueChanged(
- dynamic
- double itemSize = 40,
- double perspective = 0.0007,
- bool isInfinite = true,
- bool horizontal = true,
- double squeeze = 1.0,
- Color pointerColor = Colors.black,
- double pointerHeight = 50.0,
- double pointerWidth = 3.0,
- Widget? background,
- bool enableHapticFeedback = true,
- ModHapticFeedbackType hapticFeedbackType = ModHapticFeedbackType.vibrate,
- bool showPointer = false,
- Widget? customPointer,
- TextStyle? selectedNumberStyle = const TextStyle(fontWeight: FontWeight.bold),
- TextStyle? unSelectedNumberStyle = const TextStyle(),
- double? selectedNumberWidth,
- required num? currentIndex,
- ScrollPhysics? scrollPhysics,
- bool allowPointerTappable = true,
- num interval = 1,
- bool enableAnimation = true,
- Duration animationDuration = const Duration(seconds: 1),
- Curve animationType = Curves.easeIn,
- FixedExtentScrollController? controller,
- ModWheelSliderController? sliderController,
Constructs a ModWheelSlider with numbered UI.
Implementation
const ModWheelSlider.number({
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 = 40,
this.perspective = 0.0007,
this.isInfinite = true,
this.horizontal = true,
this.squeeze = 1.0,
this.pointerColor = Colors.black,
this.pointerHeight = 50.0,
this.pointerWidth = 3.0,
this.background,
this.enableHapticFeedback = true,
this.hapticFeedbackType = ModHapticFeedbackType.vibrate,
this.showPointer = false,
this.customPointer,
this.selectedNumberStyle = const TextStyle(fontWeight: FontWeight.bold),
this.unSelectedNumberStyle = const TextStyle(),
this.selectedNumberWidth,
required this.currentIndex,
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.number,
lineColor = null,
children = null;