WheelChooser<T>.integer constructor
WheelChooser<T>.integer ({
- required dynamic onValueChanged(
- dynamic
- required int maxValue,
- required int minValue,
- int? initValue,
- int 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,
- bool reverse = false,
Implementation
WheelChooser.integer({
required this.onValueChanged,
required int maxValue,
required int minValue,
int? initValue,
int 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,
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, onChoiceChanged = null,
datas = _createIntegerList(minValue, maxValue, step, reverse),
startPosition = initValue == null
? (controller == null ? 0 : null)
: reverse
? (maxValue - initValue) ~/ step
: (initValue - minValue) ~/ step;