rendering library

The render objects behind css_box's widgets, and what a render object needs to sit inside one of them or to host one.

A page needs none of this: its widgets are package:css_box/css_box.dart. This library is for code that composes at the render layer -- a RenderBox of its own that holds css_box's boxes, or a test that reads what they laid out -- and is imported beside that one.

THE DRY QUESTIONS. Every box here answers Flutter's dry layout and dry baseline questions, and asks them of what it holds through dryBaselineOf and dryLastBaselineOf: a box that answers no dry baseline but by asserting -- an Align on Flutter 3.38, a proxy over a box with no baseline from 3.41 to 3.47 -- is asked under Flutter's own debugCheckingIntrinsics hatch, and only where the question can reach one. A box of your own that does the same mixes in AsksGuarded; one that can say where its last line's baseline is without being laid out mixes in DryLastBaseline; a proxy that answers its child's dry baseline, and none where the child has none, mixes in ChildDryBaseline; a container that has one baseline whichever is asked mixes in OneBaseline. A box that states its own width rather than measuring it mixes in StatedWidth, and a keyword clamp asks past it.

Classes

FlexLineParentData
What a FlexLine knows about one of its children: FlexCell's fields, each under its CSS default.
FloatFlowParentData
What a FloatSlot tells its FloatFlow; see there.
HoldsSticky
A box that is the containing block of the Sticky boxes inside it: what they are shifted to, less its inset, and no further. A StickyBlock, and a table, which is its cells' (TableBox).
InlineFlowParentData
Where an atomic inline of an InlineFlow stands.
MultiColumnParentData
Where a RenderMultiColumn puts a child.
Overhangs
A box that reports no more than the room it was offered while what it lays out is past it -- a share of a height with a length beyond the share (FractionalHeight). A SpotShift aligning one aligns what it lays out, which is the box the page draws: height: 150% centred in a 32px row is 48 tall and 8 above the row.
RenderAlignBox
RenderBalance
The render object behind Balance: the paragraph under it is laid out on the breaks cuts names, which RenderPretty answers differently.
RenderBlend
RenderBlockEllipsis
The render object behind BlockEllipsis.
RenderCanvasFiltered
RenderClampedBlock
The render object behind ClampedBlock.
RenderClipBox
The render object behind ClipBox.
RenderCompressible
The render object for Compressible.
RenderDocumentExtent
The render object behind DocumentExtent.
RenderEdgeBaseline
The render object behind EdgeBaseline.
RenderFixedLayer
The render object behind FixedLayer.
RenderFixedWidth
The render object behind FixedWidth.
RenderFlexLine
FlexLine's layout: css-flexbox-1 §9 for a single line.
RenderFloatFlow
The render object behind FloatFlow.
RenderFloatText
The render object behind FloatText.
RenderFloorBox
The render object behind FloorBox.
RenderFractionalConstraints
The render object for FractionalConstraints.
RenderFractionalHeight
The render object for FractionalHeight.
RenderFractionalMinHeight
The render object for FractionalMinHeight.
RenderFractionalWidth
The render object for FractionalWidth.
RenderGapWrap
The render object behind GapWrap.
RenderGlyphBackgrounds
The render object behind GlyphBackgrounds.
RenderIndentedText
The render object behind IndentedText.
RenderInlineFlow
The render object behind InlineFlow.
RenderInlineFrame
The render object behind InlineFrame.
RenderInlineFrames
The render object behind InlineFrames.
RenderInset
RenderKeywordClamp
RenderLastBaseline
The render object behind LastBaseline.
RenderLayers
RenderLineBox
The render object behind LineBox.
RenderLineClamp
The render object behind LineClamp.
RenderLooseHeight
The render object for LooseHeight.
RenderMaskLayers
The render object behind MaskLayers: a ShaderMaskLayer whose shader is the layers' picture, drawn when the box is painted.
RenderMiddleBaseline
The render object behind MiddleBaseline.
RenderMinContentWidth
The render object behind MinContentWidth.
RenderMultiColumn
The render object of MultiColumn.
RenderOffsetSpans
The render object behind OffsetSpans.
RenderPictureTile
The render object behind PictureTile: as big as it is let be, its child laid out at the tile and painted into the tile's image.
RenderPressWhereDrawn
The screen of a PressWhereDrawn.
RenderPretty
The render object behind Pretty.
RenderRatioBox
RenderScrollPort
The view a ScrollBox scrolls on one axis: its content laid out at the view's own size and drawn moved back by the offset.
RenderSectionPin
The render object behind SectionPin: its sliver's geometry, obstructing what it is held under (SliverConstraints.overlap) as well.
RenderShrinkWidth
The render object behind ShrinkWidth.
RenderSpill
The render object behind Spill.
RenderSpotArea
RenderSpotMark
RenderSpotShift
RenderSpotText
RenderSticky
RenderStickyBlock
RenderStickyPort
RenderTableBand
RenderTableBox
RenderTableCaptions
The render object behind TableCaptions.
RenderTableShift
RenderTableSlot
RenderTileMask
The render object behind TileMask: a RenderShaderMask whose shader is the tile, made when the box is painted.
RenderTopBaseline
The render object behind TopBaseline.
RenderTracks
RoomHost
A box that offers what is inside one of its children a ROOM (Inset.room) that is not the width it lays that child out at: the width of a containing block the child does not fill. A grid item's containing block is its grid AREA (css-grid-1 9, CSS 2.1 10.1), and an item that states a width of its own is laid out at that width, not the area's -- so a percentage padding of the item is a share of a width it is never handed. The first host or Inset.room above an Inset.ofRoom that offers one is the one it reads.
TableBoxParentData
TableCaptionsParentData
TrackCellParentData
What a TrackCell tells its Tracks. A child without one has these defaults: placed by the flow, one track each way, stretched.

Mixins

AsksGuarded
A box of css_box's that asks what it holds for a dry baseline only through dryBaselineOf and dryLastBaselineOf, each of which opens the hatch for its own question where that question needs it -- or asks nothing of what it holds at all. Asked one itself, it asserts nowhere.
ChildDryBaseline
A proxy whose dry baseline is its child's, and none where the child has none.
DryLastBaseline
A box that can say where its LAST line's baseline is without being laid out.
HearsScrolls
A box painted again as any of its scrolls moves: one drawn where it is held as they scroll (Sticky).
OneBaseline
A container that answers ONE baseline, whichever is asked of it.
StatedWidth
A box whose own intrinsic width is a width it STATES rather than one it measures -- a SizedBox, a clamp, a share of the room.

Functions

contentIntrinsicWidth(RenderBox box, {required bool max, required double height}) → double
The min- or max-content width of box, past any width it states.
dryBaselineOf(RenderBox child, BoxConstraints constraints, TextBaseline baseline) → double?
A child's dry baseline, or null where it has none.
dryLastBaselineOf(RenderBox box, BoxConstraints constraints, TextBaseline baseline) → double?
The lowest baseline of an in-flow line in box, from its top, asked of a box that has not been laid out.
furthestEdge(RenderBox child, Axis axis) → double
The furthest edge on axis -- the lowest bottom, or the rightmost right -- of anything laid out under child, in child's own coordinates. The transform is carried down the tree rather than asked of each box, which walks to the root every time. Read during layout, it must be asked from a layout callback (invokeLayoutCallback): only a box's parent may read its size there otherwise.
scrollsRound(BuildContext context) → List<ViewportOffset>
The scrolls of each Scrollable context is in, nearest first.
stickyPortOf(RenderObject held) → RenderBox?
The box whose edges a box held inside it is held to: the nearest RenderStickyPort or RenderAbstractViewport round it -- a ScrollBox as a whole, not the view of each axis it scrolls in -- or the root where there is neither (Sticky).