LayoutBoxViewport class

A viewport widget that manages the rendering of layout children with scrolling support.

LayoutBoxViewport is responsible for creating and managing a RenderLayoutBox that handles the actual layout calculations and rendering. It provides the connection between the widget layer and the render object layer, managing scrolling offsets, text direction, and layout configuration.

This widget is typically not used directly but is created internally by LayoutBoxWidget to handle the scrolling and viewport logic.

Inheritance

Constructors

LayoutBoxViewport.new({Key? key, required TextDirection textDirection, required bool reversePaint, required Axis mainScrollDirection, required ViewportOffset horizontal, required ViewportOffset vertical, required AxisDirection horizontalAxisDirection, required AxisDirection verticalAxisDirection, required Layout layout, required LayoutOverflow horizontalOverflow, required LayoutOverflow verticalOverflow, required TextBaseline? textBaseline, required BorderRadius borderRadius, required Clip clipBehavior, required List<Widget> children})
Creates a layout viewport with the specified configuration.
const

Properties

borderRadius BorderRadius
The border radius applied to the viewport's background and clipping.
final
children List<Widget>
The widgets below this widget in the tree.
finalinherited
clipBehavior Clip
How to clip content that extends beyond the viewport bounds.
final
hashCode int
The hash code for this object.
no setterinherited
horizontal ViewportOffset
The horizontal scroll offset for this viewport.
final
horizontalAxisDirection AxisDirection
The direction of the horizontal axis.
final
horizontalOverflow LayoutOverflow
How to handle content that exceeds horizontal bounds.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layout Layout
The layout algorithm to use for positioning children.
final
mainScrollDirection Axis
The primary scrolling axis for this viewport.
final
reversePaint bool
Whether to reverse the paint order of children.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textBaseline TextBaseline?
The text baseline to use for text alignment within the layout.
final
textDirection TextDirection
The text direction for resolving directional layout properties.
final
vertical ViewportOffset
The vertical scroll offset for this viewport.
final
verticalAxisDirection AxisDirection
The direction of the vertical axis.
final
verticalOverflow LayoutOverflow
How to handle content that exceeds vertical bounds.
final

Methods

createElement() MultiChildRenderObjectElement
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
createRenderObject(BuildContext context) RenderObject
Creates the render object that will perform the actual layout and painting.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didUnmountRenderObject(covariant RenderObject renderObject) → void
This method is called when a RenderObject that was previously associated with this widget is removed from the render tree. The provided RenderObject will be of the same type as the one created by this widget's createRenderObject method.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited
updateRenderObject(BuildContext context, covariant RenderLayoutBox renderObject) → void
Updates the render object when widget properties change.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited