RenderListWheelViewport constructor
- required ListWheelChildManager childManager,
- required ViewportOffset offset,
- double diameterRatio = defaultDiameterRatio,
- double perspective = defaultPerspective,
- double offAxisFraction = 0,
- bool useMagnifier = false,
- double magnification = 1,
- double overAndUnderCenterOpacity = 1,
- required double itemExtent,
- double squeeze = 1,
- bool renderChildrenOutsideViewport = false,
- Clip clipBehavior = Clip.none,
- List<
RenderBox> ? children,
Creates a RenderListWheelViewport which renders children on a wheel.
Optional arguments have reasonable defaults.
Implementation
RenderListWheelViewport({
required this.childManager,
required ViewportOffset offset,
double diameterRatio = defaultDiameterRatio,
double perspective = defaultPerspective,
double offAxisFraction = 0,
bool useMagnifier = false,
double magnification = 1,
double overAndUnderCenterOpacity = 1,
required double itemExtent,
double squeeze = 1,
bool renderChildrenOutsideViewport = false,
Clip clipBehavior = Clip.none,
List<RenderBox>? children,
}) : assert(diameterRatio > 0, diameterRatioZeroMessage),
assert(perspective > 0),
assert(perspective <= 0.01, perspectiveTooHighMessage),
assert(magnification > 0),
assert(overAndUnderCenterOpacity >= 0 && overAndUnderCenterOpacity <= 1),
assert(squeeze > 0),
assert(itemExtent > 0),
assert(
!renderChildrenOutsideViewport || clipBehavior == Clip.none,
clipBehaviorAndRenderChildrenOutsideViewportConflict,
),
_offset = offset,
_diameterRatio = diameterRatio,
_perspective = perspective,
_offAxisFraction = offAxisFraction,
_useMagnifier = useMagnifier,
_magnification = magnification,
_overAndUnderCenterOpacity = overAndUnderCenterOpacity,
_itemExtent = itemExtent,
_squeeze = squeeze,
_renderChildrenOutsideViewport = renderChildrenOutsideViewport,
_clipBehavior = clipBehavior {
addAll(children);
}