RenderListWheelViewport constructor

RenderListWheelViewport({@required ListWheelChildManager childManager, @required ViewportOffset offset, double diameterRatio: defaultDiameterRatio, double perspective: defaultPerspective, double offAxisFraction: 0.0, bool useMagnifier: false, double magnification: 1.0, @required double itemExtent, bool clipToSize: true, bool renderChildrenOutsideViewport: false, 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.0,
  bool useMagnifier = false,
  double magnification = 1.0,
  @required double itemExtent,
  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(itemExtent != null),
     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,
     _itemExtent = itemExtent,
     _clipToSize = clipToSize,
     _renderChildrenOutsideViewport = renderChildrenOutsideViewport {
  addAll(children);
}