ModWheelSlider.customWidget constructor
const
ModWheelSlider.customWidget({
- 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 = 10,
- 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,
- required List<
Widget> ? children, - Widget? background,
- bool enableHapticFeedback = true,
- ModHapticFeedbackType hapticFeedbackType = ModHapticFeedbackType.vibrate,
- bool showPointer = true,
- Widget? customPointer,
- ScrollPhysics? scrollPhysics,
- bool allowPointerTappable = true,
- bool enableAnimation = true,
- Duration animationDuration = const Duration(seconds: 1),
- Curve animationType = Curves.easeIn,
- FixedExtentScrollController? controller,
- ModWheelSliderController? sliderController,
Constructs a ModWheelSlider with custom child widgets.
Implementation
const ModWheelSlider.customWidget({
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.pointerColor = Colors.black,
this.pointerHeight = 50.0,
this.pointerWidth = 3.0,
required this.children,
this.background,
this.enableHapticFeedback = true,
this.hapticFeedbackType = ModHapticFeedbackType.vibrate,
this.showPointer = true,
this.customPointer,
this.scrollPhysics,
this.allowPointerTappable = true,
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.custom,
lineColor = null,
selectedNumberStyle = null,
unSelectedNumberStyle = null,
selectedNumberWidth = null,
currentIndex = null,
interval = 1;