DHPicker constructor Null safety

DHPicker(
  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. Widget? label,
  11. EdgeInsetsGeometry? labelPadding,
  12. AlignmentGeometry labelAlignment = Alignment.center,
  13. required double itemExtent,
  14. required ValueChanged<int>? onSelectedItemChanged,
  15. required List<Widget> children,
  16. bool looping = false}
)

Implementation

DHPicker({
  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.label,
  this.labelPadding,
  this.labelAlignment = Alignment.center,
  required this.itemExtent,
  required this.onSelectedItemChanged,
  required List<Widget> children,
  bool looping = false,
})  : assert(children != 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 = looping
          ? ListWheelChildLoopingListDelegate(children: children)
          : ListWheelChildListDelegate(children: children),
      super(key: key);