ListWheelScrollView.useDelegate constructor Null safety
- {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,
- 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.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,
);