RenderPadding class final

Lays its child out inside padding: it is as big as the child and the padding, within its constraints, and the child is EdgeInsets.left columns in and EdgeInsets.top rows down. Without a child it is as big as the padding.

Inheritance
Mixed-in types

Constructors

RenderPadding({required EdgeInsets padding, RenderObject? child})
Insets child, if any, by padding.

Properties

checkedBeforePaint ↔ bool
Whether beforePaint is called while this object is attached. Off by default.
getter/setter pairinherited
child ↔ RenderObject?
The one child of this object; null for none.
getter/setter pairinherited
constraints → BoxConstraints?
The constraints of the last layout; null before the first.
no setterinherited
debugError → String?
The message of the error this object shows in its place, which its layout or paint threw; null when it shows itself.
no setterinherited
debugNeedsLayout → bool
Whether this object is to be laid out on the next frame.
no setterinherited
debugNeedsPaint → bool
Whether this object, a repaint boundary or the root, is to be repainted on the next frame (markNeedsPaint inside it).
no setterinherited
depth → int
How many ancestors this object has: 0 for the root. The owner lays out and paints what is marked outermost first, by depth.
no setterinherited
globalOffset → (int, int)
The column and row of this object's top left cell on the screen: its offset and its ancestors' added up, as the last layout placed them.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
height ↔ int
How many rows this object takes, set by its performLayout within the constraints it was given.
getter/setter pairinherited
hitTestBehavior → HitTestBehavior
Defers to the child.
no setterinherited
isRepaintBoundary → bool
Whether this object is a repaint boundary, repainted on its own over what it painted before when something inside it is marked (markNeedsPaint); false by default.
no setterinherited
keepsUnderlay → bool
Whether this repaint boundary paints over what is under it, with no background of its own: a field, a gauge over a dialog, a selected row, a gradient; false by default.
no setterinherited
owner ↔ PipelineOwner?
The pipeline this object is attached to (attach); null while it is detached, when nothing in it is laid out or painted.
getter/setter pairinherited
padding ↔ EdgeInsets
The empty cells on each side of the child; a new one lays the box out again.
getter/setter pair
paintedWhenCutOff ↔ bool
Whether this object is painted even where the clip of its parent leaves none of it, and so are the objects above it: its paint does more than paint its cells (it shows the terminal's cursor, or hides it), which has to happen however it is cut off. Its cells are not painted then: the clip it paints in is empty. Off by default: a child the clip leaves no cell of is not painted, nor anything inside it (paintChild).
getter/setter pairinherited
parent ↔ RenderObject?
The object this one is a child of; set by the parent (adopt, drop).
getter/setter pairinherited
parentData ↔ ParentData
What the parent keeps on this object: its offset and whatever else the parent's layout needs. Set up by the parent when it adopts this object (setupParentData) and filled in by the parent's layout.
getter/setter pairinherited
putsUnderlayBack → bool
Whether the owner puts back the underlay of the rows this boundary repaints on its own, before it repaints them (keepsUnderlay); true by default. False for one that keeps cells it does not repaint, which puts it back itself (putUnderlayBack).
no setterinherited
repaintedWhole ↔ bool
Whether all of this object is repainted whenever a repaint boundary it is in repaints any of its rows: what it paints depends on more than itself and what is inside it (where another object is now), so a change elsewhere in the boundary may change it without marking it. Off by default: a boundary repaints only the rows of the objects marked for paint in it (markNeedsPaint).
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizedByParent → bool
Whether this object's size depends on its constraints alone; false by default. Whatever changes inside it, its parent sees the same size, so the object is a relayout boundary. Read in layout once constraints are the new ones, so it may depend on them.
no setterinherited
underlayRowsAlike → bool
Whether every row of the underlay of this boundary is the same (keepsUnderlay): rows of it moved up or down on the surface then show over what is under their new place; false where its parent has not painted all of it since it moved, or keeps none.
no setterinherited
width ↔ int
How many columns this object takes, set by its performLayout within the constraints it was given.
getter/setter pairinherited

Methods

adopt(RenderObject child) → void
Makes child, which has no parent, a child of this object: gives it parentData (setupParentData), attaches it to this object's owner, if any, and lays this object out again. The parent's own list of children holds it too (RenderObjectWithChildMixin.child, ContainerRenderObjectMixin.insert).
inherited
attach(PipelineOwner o) → void
Joins the pipeline of o, with everything inside it: the owner lays out and paints what is marked in it. A relayout boundary marked while detached is laid out on the next frame, and the intrinsic sizes worked out before are forgotten, since o measures text with its own segmenter. The parent attaches what it adopts (adopt), and the owner its root (PipelineOwner.root).
inherited
beforePaint() → void
Called, while this object is checkedBeforePaint, by each PipelineOwner.flushPaint that has anything to paint: after layout, before the flush settles the rows its boundaries repaint. What it marks for paint here (markNeedsPaint) that flush paints. One that paints by where other objects are, which may move in another repaint boundary without marking it, marks itself here when they moved: in the same frame. What it throws, it shows, marked for paint.
inherited
computeMaxIntrinsicHeight(int width) → int
What getMaxIntrinsicHeight answers; see computeMinIntrinsicWidth.
override
computeMaxIntrinsicWidth(int height) → int
What getMaxIntrinsicWidth answers; see computeMinIntrinsicWidth.
override
computeMinIntrinsicHeight(int width) → int
What getMinIntrinsicHeight answers; see computeMinIntrinsicWidth.
override
computeMinIntrinsicWidth(int height) → int
What getMinIntrinsicWidth answers, worked out without laying anything out. A container asks its children through their get methods, so their answers are cached too; text is measured with the owner's PipelineOwner.segmenter, as the canvas draws it. An object asks for nothing (0) unless it overrides these.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Adds what describes this object, besides its type, size and flags, to properties, those not worth showing (a default) left out; an override calls this first. Only describe calls it: a frame never does.
override
describe() → DiagnosticsNode
This object and those below it as a tree of descriptions, built when called: its type; the properties debugFillProperties adds, those its parent keeps on it (ParentData.debugFillProperties), its offset in the parent and the constraints of its last layout (tight, or what describeConstraints says); the error it shows in its place, if any (debugError); its size once laid out; and as flags whether it is a repaint boundary, a relayout boundary, to be laid out, to be repainted or showing an error.
inherited
detach() → void
Leaves the pipeline: nothing in this subtree is painted until it is attached again.
inherited
drop(RenderObject child) → void
Removes child from this object (the parent's own list of children must no longer hold it): it is detached from the pipeline, and this object is laid out and repainted without it.
inherited
getMaxIntrinsicHeight(int width) → int
The height beyond which this object has no use for more at width.
inherited
getMaxIntrinsicWidth(int height) → int
The width beyond which this object has no use for more at height (for text, its widest line unbroken).
inherited
getMinIntrinsicHeight(int width) → int
The fewest rows this object can have at width without cutting its content off.
inherited
getMinIntrinsicWidth(int height) → int
The narrowest this object can be at height without cutting its content off (for text, the widest piece no line break can split). What a parent asks before laying the object out; answered once per argument until markNeedsLayout (see computeMinIntrinsicWidth).
inherited
hitTest(HitTestResult result, int x, int y) → bool
Adds what is at x, y of this object, a cell in its own coordinates, to result: nothing when the cell is outside its bounds (a child that sticks out of its parent is cut off there, as paint cuts it); otherwise the children hit there (hitTestChildren), then this object when it is hit there itself (hitTestSelf), a child is, or it is HitTestBehavior.translucent. Returns whether it is hit: then what it covers is not tested. An object that shows an error (debugError) is hit anywhere in its bounds, and its children not tested. Uses the last layout; allocates nothing.
inherited
hitTestChildren(HitTestResult result, int x, int y) → bool
Hit tests the children at x, y of this object, each in its own coordinates, the one painted last (on top) first, until one is hit; returns whether one was. Nothing by default.
inherited
hitTestSelf(int x, int y) → bool
Whether this object is hit at x, y of its own, a cell in its bounds, where no child is: when it is HitTestBehavior.opaque. One that paints only some of its cells may answer for each.
inherited
invalidatePaintCache() → void
Forgets what this object kept of what it painted before, to paint from that: its cells were, or will be, painted over by an ancestor, or an object inside it was marked for paint (markNeedsPaint). Nothing by default.
inherited
invokeLayoutCallback(void callback()) → void
Runs callback in this object's performLayout, before it lays its children out: the callback may adopt, replace and drop children of this object and of those below it (a widget layer builds them there). The marks that makes stop at this object, which is being laid out, or at relayout boundaries, which the owner lays out after it in the same flush (PipelineOwner.flushLayout): what changed is laid out before anything is painted. When an intrinsic size this object answered before comes out different afterwards, its parent may have laid it out by the old one: the parent is laid out again on the next frame, or the object itself when it is the root (whose owner's frame may size an inline region by it).
inherited
layout(BoxConstraints c, {bool parentUsesSize = false}) → void
Lays this object out within c. A parent whose layout reads this object's size passes parentUsesSize. Otherwise, or when c is tight or the object is sizedByParent, its size can't change the parent's layout: the object is a relayout boundary, where markNeedsLayout inside it stops.
inherited
markNeedsLayout() → void
Lays this object out on the next frame, with the ancestors whose layout uses its size: the mark climbs to the nearest relayout boundary, and the owner lays that boundary's subtree out. Forgets the intrinsic sizes worked out so far; when any was asked for, the parent is marked too, boundary or not, since its layout may have used them.
inherited
markNeedsPaint() → void
Repaints this object on the next frame, with the nearest repaint boundary at or above it; a boundary above it forgets what it painted before (invalidatePaintCache). Of that boundary only the rows this object covers then are repainted, all of them across: what its ancestors paint there, then what is inside them there, in order. A boundary marked itself repaints all of it.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(PaintContext ctx) → void
Paints this object at the canvas origin, the canvas clipped to its bounds, and its children with paintChild. What this throws, the object shows in its place (see RenderObject).
override
paintChild(PaintContext ctx, RenderObject child) → void
Paints child at its offset, cut off at its bounds. A child the clip leaves no cell of is not painted, nor anything inside it, unless something inside it is paintedWhenCutOff; one not painted keeps what it kept of its paint, since its cells are as it left them.
inherited
paintOver(PaintContext ctx, RenderObject child, int x, int y, int w, int h) → void
Paints again what this object paints over child in the cells x, y, w × h of its own (paintsOver), which a repaint boundary inside child has just repainted on its own, over whatever covered it there. The canvas is clipped to those cells, its origin at this object.
inherited
paintsOver(RenderObject child, int x, int y, int w, int h) → bool
Whether this object paints anything over child in the cells x, y, w × h of its own. Not by default: only children that overlap paint over each other (RenderStack).
inherited
performLayout(BoxConstraints c) → void
Sets width and height within c, laying out and placing the children first; layout calls it, when the constraints are new or the object was marked (markNeedsLayout).
override
putUnderlayBack(Canvas canvas, int x, int y, int w, int h) → void
Puts back the styles of the cells under this boundary (keepsUnderlay) in its rectangle at x, y of w × h cells (in its own coordinates, within the clip of canvas): what it then paints there is over what its parent left. A cell its parent has not painted since it moved is left as it is. For a boundary that puts it back itself (putsUnderlayBack false), before it paints the cells.
inherited
setupParentData(RenderObject child) → void
Gives child, about to be adopted, the kind of parentData this object's layout keeps on it. A container that keeps more than the offset replaces data of any other kind.
inherited
toString() → String
A string representation of this object.
inherited
visitChildren(void visit(RenderObject child)) → void
Calls visit with each child of this object, in paint order; none by default. An object with children overrides it, which the pipeline walks the tree by (attach, detach, describe).
inherited
wholeRows(Int32List rows) → void
Which of its rows this object, repaintedWhole, has repainted with a repaint boundary it is in that repaints any rows: rows holds 0 and its height when asked, and is left holding the first of them, in its own coordinates, and the row after the last; none when the first is not before the other. All of them unless it says otherwise: one that paints by where other objects are may answer the rows it showed in last joined with those it shows in now, and none when they are the same. Asked as a flushPaint settles the rows its boundaries repaint, after layout and before anything is painted, once for each boundary around it that repaints any rows: the same answer every time in one flush.
inherited

Operators

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