DHPicker.builder constructor Null safety

DHPicker.builder(
  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? label,
  10. EdgeInsetsGeometry? labelPadding,
  11. AlignmentGeometry labelAlignment = Alignment.center,
  12. required double itemExtent,
  13. required ValueChanged<int>? onSelectedItemChanged,
  14. required NullableIndexedWidgetBuilder itemBuilder,
  15. int? childCount,
  16. Widget? selectionOverlay = const DefaultSelectionOverlay()}
)

Implementation

DHPicker.builder({
  Key? key,
  this.diameterRatio = kDefaultDiameterRatio,
  this.backgroundColor,
  this.offAxisFraction = 0.0,
  this.useMagnifier = false,
  this.magnification = 1.0,
  this.scrollController,
  this.squeeze = kSqueeze,
  this.label,
  this.labelPadding,
  this.labelAlignment = Alignment.center,
  required this.itemExtent,
  required this.onSelectedItemChanged,
  required NullableIndexedWidgetBuilder itemBuilder,
  int? childCount,
  this.selectionOverlay = const DefaultSelectionOverlay(),
})  : assert(itemBuilder != null),
      assert(diameterRatio != null),
      assert(diameterRatio > 0.0,
          RenderListWheelViewport.diameterRatioZeroMessage),
      assert(magnification > 0),
      assert(itemExtent != null),
      assert(itemExtent > 0),
      assert(squeeze != null),
      assert(squeeze > 0),
      childDelegate = ListWheelChildBuilderDelegate(
          builder: itemBuilder, childCount: childCount),
      super(key: key);