ListWheelScrollView constructor

ListWheelScrollView({
  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. HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
  16. String? restorationId,
  17. ScrollBehavior? scrollBehavior,
  18. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  19. required List<Widget> children,
})

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

Implementation

ListWheelScrollView({
  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.hitTestBehavior = HitTestBehavior.opaque,
  this.restorationId,
  this.scrollBehavior,
  this.dragStartBehavior = DragStartBehavior.start,
  required List<Widget> children,
}) : assert(diameterRatio > 0.0, RenderListWheelViewport.diameterRatioZeroMessage),
     assert(perspective > 0),
     assert(perspective <= 0.01, RenderListWheelViewport.perspectiveTooHighMessage),
     assert(magnification > 0),
     assert(overAndUnderCenterOpacity >= 0 && overAndUnderCenterOpacity <= 1),
     assert(itemExtent > 0),
     assert(squeeze > 0),
     assert(
       !renderChildrenOutsideViewport || clipBehavior == Clip.none,
       RenderListWheelViewport.clipBehaviorAndRenderChildrenOutsideViewportConflict,
     ),
     childDelegate = ListWheelChildListDelegate(children: children);