RenderObject class abstract

Base class for objects in the render tree.

RenderObjects know how to layout themselves and record paint commands.

Implementers

Constructors

RenderObject()

Properties

children List<RenderObject>
Child RenderObjects
final
debugNeedsLayout bool
Whether this render object is waiting for layout.
no setter
debugNeedsPaint bool
Whether this render object is waiting for paint.
no setter
hashCode int
The hash code for this object.
no setterinherited
height int
Height in terminal cells, assigned during layout.
getter/setter pair
parent RenderObject?
Parent RenderObject in the tree
getter/setter pair
pipelineOwner → PipelineOwner?
The pipeline owner this render object is attached to, if any.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
Width in terminal cells, assigned during layout.
getter/setter pair
x int
Horizontal position in terminal cells, relative to the parent.
getter/setter pair
y int
Vertical position in terminal cells, relative to the parent.
getter/setter pair

Methods

adoptChild(RenderObject child) → void
Add a child to this render object
attach(PipelineOwner owner) → void
Attach this render object and its existing children to owner.
detach() → void
Called when the render object is detached from the render tree.
dropChild(RenderObject child) → void
Remove a child from this render object
hitTest(HitTestResult result, Offset position) bool
Hit-test this render object using position in local coordinates.
layout(Constraints constraints) → void
Entry point for layout.
markNeedsLayout() → void
Mark this render object as needing layout and paint.
markNeedsPaint() → void
Mark this render object as needing paint.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(PaintingContext context, Offset offset) → void
Paint protocol: record drawing commands at offset.
performLayout(Constraints constraints) → void
Layout protocol: given constraints, compute size and position.
toString() String
A string representation of this object.
inherited
visitChildren(void visitor(RenderObject child)) → void
Visit all children with a callback

Operators

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