RenderScrollBox class

RenderObject behind ScrollBox: lays out its child unbounded along the scroll axis, then translates and clips during paint. Renders an optional 1-cell scrollbar gutter on the trailing edge.

Inheritance

Constructors

RenderScrollBox({required ScrollController controller, required Axis scrollDirection, required bool showScrollbar, required Color scrollbarColor, required Color trackColor, CursorController? cursorController})
Borrows controller; layout sizes the child with an unbounded scroll axis and publishes extents, while paint translates, clips, and draws any scrollbar.

Properties

child ↔ RenderBox?
The single render child, or null when there is none.
getter/setter pairinherited
children → List<RenderObject>
Live read-only view of direct children in traversal order.
latefinalinherited
controller ← ScrollController
no getter
cursorController ← CursorController?
The cursor publication this viewport clips.
no getter
debugNeedsLayout → bool
Whether this render object is waiting for layout.
no setterinherited
debugNeedsPaint → bool
Whether this render object is waiting for paint.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
height ↔ int
Height in terminal cells, assigned during layout.
getter/setter pairinherited
parent → RenderObject?
Parent RenderObject in the tree.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollbarColor ← Color
no getter
scrollDirection ← Axis
no getter
showScrollbar ← bool
no getter
size ↔ Size
The current size of this box, or Size.zero if not laid out
getter/setter pairinherited
trackColor ← Color
no getter
width ↔ int
Width in terminal cells, assigned during layout.
getter/setter pairinherited
x ↔ int
Horizontal position in terminal cells, relative to the parent.
getter/setter pairinherited
y ↔ int
Vertical position in terminal cells, relative to the parent.
getter/setter pairinherited

Methods

adoptChild(RenderObject child) → void
Add a child to this render object
inherited
detach() → void
Called when the render object is detached from the render tree.
override
dropChild(RenderObject child) → void
Remove a child from this render object
inherited
hitTest(HitTestResult result, Offset position) → bool
Hit-test this render object using position in local coordinates.
inherited
hitTestChildren(HitTestResult result, Offset position) → bool
Hit-test children in reverse paint order.
override
hitTestSelf(Offset position) → bool
Whether this box should add itself to a hit-test path.
inherited
layout(Constraints constraints) → void
Entry point for layout.
inherited
markNeedsLayout() → void
Mark this render object as needing layout and paint.
inherited
markNeedsPaint() → void
Mark this render object as needing paint.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(PaintingContext context, Offset offset) → void
Default paint implementation.
override
performBoxLayout(BoxConstraints constraints) → void
Perform layout with typed box constraints
override
performLayout(Constraints constraints) → void
Perform layout with box constraints
inherited
positionChild(RenderBox child, int x, int y) → void
Position a child within this box
inherited
setChild(RenderObject? child) → void
Replace this object's single render child.
inherited
toString() → String
A string representation of this object.
inherited
visitChildren(void visitor(RenderObject child)) → void
Visit all children with a callback
inherited

Operators

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