RenderListWheelViewport constructor Null safety
- {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.
All arguments must not be null. 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(childManager != null),
assert(offset != null),
assert(diameterRatio != null),
assert(diameterRatio > 0, diameterRatioZeroMessage),
assert(perspective != null),
assert(perspective > 0),
assert(perspective <= 0.01, perspectiveTooHighMessage),
assert(offAxisFraction != null),
assert(useMagnifier != null),
assert(magnification != null),
assert(magnification > 0),
assert(overAndUnderCenterOpacity != null),
assert(overAndUnderCenterOpacity >= 0 && overAndUnderCenterOpacity <= 1),
assert(itemExtent != null),
assert(squeeze != null),
assert(squeeze > 0),
assert(itemExtent > 0),
assert(renderChildrenOutsideViewport != null),
assert(clipBehavior != null),
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);
}