ListWheelScrollView.useDelegate constructor
- Key? key,
- ScrollController? controller,
- ScrollPhysics? physics,
- double diameterRatio = RenderListWheelViewport.defaultDiameterRatio,
- double perspective = RenderListWheelViewport.defaultPerspective,
- double offAxisFraction = 0.0,
- bool useMagnifier = false,
- double magnification = 1.0,
- double overAndUnderCenterOpacity = 1.0,
- required double itemExtent,
- double squeeze = 1.0,
- ValueChanged<
int> ? onSelectedItemChanged, - bool renderChildrenOutsideViewport = false,
- Clip clipBehavior = Clip.hardEdge,
- HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
- String? restorationId,
- ScrollBehavior? scrollBehavior,
- 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.hitTestBehavior = HitTestBehavior.opaque,
this.restorationId,
this.scrollBehavior,
required this.childDelegate,
}) : 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,
);