- protected
- mustCallSuper
Copies the configuration described by widget to this element's renderObject.
Source
@protected @mustCallSuper void updateRenderObject(@checked VirtualViewport oldWidget) { renderObject.virtualChildCount = _widgetProvider.virtualChildCount; if (startOffsetBase != null) { _updatePaintOffset(); // If we don't already need layout, we need to request a layout if the // viewport has shifted to expose new children. if (!renderObject.needsLayout) { final double startOffset = widget.startOffset; bool shouldLayout = false; if (startOffsetBase != null) { if (startOffset < startOffsetBase) shouldLayout = true; else if (startOffset == startOffsetBase && oldWidget?.startOffset != startOffsetBase) shouldLayout = true; } if (startOffsetLimit != null) { if (startOffset > startOffsetLimit) shouldLayout = true; else if (startOffset == startOffsetLimit && oldWidget?.startOffset != startOffsetLimit) shouldLayout = true; } if (shouldLayout) renderObject.markNeedsLayout(); } } }