ListWheelScrollView.useDelegate constructor Null safety

const ListWheelScrollView.useDelegate(
  1. {Key? key,
  2. ScrollController? controller,
  3. ScrollPhysics? physics,
  4. double diameterRatio = RenderListWheelViewport.defaultDiameterRatio,
  5. double perspective = RenderListWheelViewport.defaultPerspective,
  6. double offAxisFraction = 0.0,
  7. bool useMagnifier = false,
  8. double magnification = 1.0,
  9. double overAndUnderCenterOpacity = 1.0,
  10. required double itemExtent,
  11. double squeeze = 1.0,
  12. ValueChanged<int>? onSelectedItemChanged,
  13. bool renderChildrenOutsideViewport = false,
  14. Clip clipBehavior = Clip.hardEdge,
  15. String? restorationId,
  16. ScrollBehavior? scrollBehavior,
  17. required ListWheelChildDelegate childDelegate}
)

Constructs a list in which children are scrolled a wheel. Its children are managed by a delegate and are lazily built during layout.

Implementation

const ListWheelScrollView.useDelegate({
  super.key,
  this.controller,
  this.physics,
  this.diameterRatio = RenderListWheelViewport.defaultDiameterRatio,
  this.perspective = RenderListWheelViewport.defaultPerspective,
  this.offAxisFraction = 0.0,
  this.useMagnifier = false,
  this.magnification = 1.0,
  this.overAndUnderCenterOpacity = 1.0,
  required this.itemExtent,
  this.squeeze = 1.0,
  this.onSelectedItemChanged,
  this.renderChildrenOutsideViewport = false,
  this.clipBehavior = Clip.hardEdge,
  this.restorationId,
  this.scrollBehavior,
  required this.childDelegate,
}) : assert(childDelegate != null),
     assert(diameterRatio != null),
     assert(diameterRatio > 0.0, RenderListWheelViewport.diameterRatioZeroMessage),
     assert(perspective != null),
     assert(perspective > 0),
     assert(perspective <= 0.01, RenderListWheelViewport.perspectiveTooHighMessage),
     assert(magnification > 0),
     assert(overAndUnderCenterOpacity != null),
     assert(overAndUnderCenterOpacity >= 0 && overAndUnderCenterOpacity <= 1),
     assert(itemExtent != null),
     assert(itemExtent > 0),
     assert(squeeze != null),
     assert(squeeze > 0),
     assert(renderChildrenOutsideViewport != null),
     assert(clipBehavior != null),
     assert(
       !renderChildrenOutsideViewport || clipBehavior == Clip.none,
       RenderListWheelViewport.clipBehaviorAndRenderChildrenOutsideViewportConflict,
     );