ListWheelViewport constructor
Creates a viewport where children are rendered onto a wheel.
The diameterRatio
argument defaults to 2.0 and must not be null.
The perspective
argument defaults to 0.003 and must not be null.
The itemExtent
argument in pixels must be provided and must be positive.
The clipToSize
argument defaults to true and must not be null.
The renderChildrenOutsideViewport
argument defaults to false and must
not be null.
The offset
argument must be provided and must not be null.
Implementation
const ListWheelViewport({
Key key,
this.diameterRatio = RenderListWheelViewport.defaultDiameterRatio,
this.perspective = RenderListWheelViewport.defaultPerspective,
this.offAxisFraction = 0.0,
this.useMagnifier = false,
this.magnification = 1.0,
@required this.itemExtent,
this.clipToSize = true,
this.renderChildrenOutsideViewport = false,
@required this.offset,
@required this.childDelegate,
}) : assert(childDelegate != null),
assert(offset != null),
assert(diameterRatio != null),
assert(diameterRatio > 0, RenderListWheelViewport.diameterRatioZeroMessage),
assert(perspective != null),
assert(perspective > 0),
assert(perspective <= 0.01, RenderListWheelViewport.perspectiveTooHighMessage),
assert(itemExtent != null),
assert(itemExtent > 0),
assert(clipToSize != null),
assert(renderChildrenOutsideViewport != null),
assert(
!renderChildrenOutsideViewport || !clipToSize,
RenderListWheelViewport.clipToSizeAndRenderChildrenOutsideViewportConflict,
),
super(key: key);