WheelChooser<T>.number constructor
WheelChooser<T>.number ({
- required dynamic onValueChanged(
- dynamic
- required num maxValue,
- required num minValue,
- num? initValue,
- num step = 1,
- TextStyle? selectTextStyle,
- TextStyle? unSelectTextStyle,
- double squeeze = 1.0,
- double itemSize = _defaultItemSize,
- double magnification = 1,
- double perspective = 0.01,
- double? listWidth,
- double? listHeight,
- FixedExtentScrollController? controller,
- bool horizontal = false,
- bool isInfinite = false,
- ScrollPhysics? physics,
- dynamic onChoiceChanged(
- dynamic
- bool reverse = false,
Implementation
WheelChooser.number({
required this.onValueChanged,
required num maxValue,
required num minValue,
num? initValue,
num step = 1,
this.selectTextStyle,
this.unSelectTextStyle,
this.squeeze = 1.0,
this.itemSize = _defaultItemSize,
this.magnification = 1,
this.perspective = 0.01,
this.listWidth,
this.listHeight,
this.controller,
this.horizontal = false,
this.isInfinite = false,
this.physics,
this.onChoiceChanged,
bool reverse = false,
}) : assert(perspective <= 0.01),
assert(minValue < maxValue),
assert(initValue == null || initValue >= minValue),
assert(initValue == null || maxValue >= initValue),
assert(step > 0),
assert(controller == null || initValue == null),
children = null, choices = null,
datas = _createNumbersList(minValue, maxValue, step, reverse),
startPosition = initValue == null
? (controller == null ? 0 : null)
: reverse
? (maxValue - initValue) ~/ step
: (initValue - minValue) ~/ step;