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 clipToSize: true,
  12. bool renderChildrenOutsideViewport: false,
  13. 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 clipToSize = true,
  bool renderChildrenOutsideViewport = false,
  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(clipToSize != null),
     assert(renderChildrenOutsideViewport != null),
     assert(
       !renderChildrenOutsideViewport || !clipToSize,
       clipToSizeAndRenderChildrenOutsideViewportConflict,
     ),
     _offset = offset,
     _diameterRatio = diameterRatio,
     _perspective = perspective,
     _offAxisFraction = offAxisFraction,
     _useMagnifier = useMagnifier,
     _magnification = magnification,
     _overAndUnderCenterOpacity = overAndUnderCenterOpacity,
     _itemExtent = itemExtent,
     _squeeze = squeeze,
     _clipToSize = clipToSize,
     _renderChildrenOutsideViewport = renderChildrenOutsideViewport {
  addAll(children);
}