NumberPicker constructor

NumberPicker({
  1. Key? key,
  2. double diameterRatio = kDefaultDiameterRatio,
  3. Color? backgroundColor,
  4. double offAxisFraction = 0.0,
  5. bool useMagnifier = false,
  6. double magnification = 1.0,
  7. FixedExtentScrollController? scrollController,
  8. double squeeze = kSqueeze,
  9. Widget? selectionOverlay = const DefaultSelectionOverlay(),
  10. bool looping = false,
  11. required double itemExtent,
  12. required ValueChanged<num>? onSelectedItemChanged,
  13. required num max,
  14. required num min,
  15. required num interval,
  16. NumIndexFormatter? indexFormat,
  17. TextStyle? textStyle,
  18. Widget? label,
  19. EdgeInsetsGeometry? labelPadding,
  20. AlignmentGeometry labelAlignment = Alignment.center,
})

Implementation

NumberPicker({
  Key? key,
  this.diameterRatio = kDefaultDiameterRatio,
  this.backgroundColor,
  this.offAxisFraction = 0.0,
  this.useMagnifier = false,
  this.magnification = 1.0,
  this.scrollController,
  this.squeeze = kSqueeze,
  this.selectionOverlay = const DefaultSelectionOverlay(),
  this.looping = false,
  required this.itemExtent,
  required this.onSelectedItemChanged,
  required this.max,
  required this.min,
  required this.interval,
  this.indexFormat,
  this.textStyle,
  this.label,
  this.labelPadding,
  this.labelAlignment = Alignment.center,
})  : assert(min <= max),
      assert(diameterRatio > 0.0,
          RenderListWheelViewport.diameterRatioZeroMessage),
      assert(magnification > 0),
      assert(itemExtent > 0),
      assert(squeeze > 0),
      super(key: key);