RenderListWheelViewport constructor

RenderListWheelViewport({
  1. required ListWheelChildManager childManager,
  2. required ViewportOffset offset,
  3. double diameterRatio = defaultDiameterRatio,
  4. double perspective = defaultPerspective,
  5. double offAxisFraction = 0,
  6. bool useMagnifier = false,
  7. double magnification = 1,
  8. double overAndUnderCenterOpacity = 1,
  9. required double itemExtent,
  10. double squeeze = 1,
  11. bool renderChildrenOutsideViewport = false,
  12. Clip clipBehavior = Clip.none,
  13. 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);
}