Box class
A layout container in the independent layout system.
Box represents a node in the layout tree that can contain children and participate in layout calculations. It implements ParentLayout and provides the foundation for building layout hierarchies independent of Flutter's widget system. Boxes manage their children, handle layout constraints, and coordinate positioning and sizing.
- Mixed-in types
Constructors
-
Box.new({required LayoutTextDirection textDirection, required LayoutOverflow horizontalOverflow, required LayoutOverflow verticalOverflow, required Layout boxLayout, LayoutData? layoutData, LayoutTextBaseline? textBaseline, double scrollOffsetX = 0.0, double scrollOffsetY = 0.0, List<
Box> ? children, Object? debugKey})
Properties
- actualPaintBounds → LayoutRect
-
no setter
- boxLayout ↔ Layout
-
getter/setter pair
- childCount → int
-
no setter
- constraints → LayoutConstraints
-
no setter
- contentSize → LayoutSize
-
The total size of all content within this layout.
no setteroverride
- debugKey ↔ Object?
-
getter/setter pair
- firstChild → Box?
-
no setter
- firstLayoutChild → ChildLayout?
-
The first child in the layout tree.
no setteroverride
- firstSortedChild → Box?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSize → bool
-
no setter
- horizontalOverflow ↔ LayoutOverflow
-
getter/setter pair
- lastChild → Box?
-
no setter
- lastLayoutChild → ChildLayout?
-
The last child in the layout tree.
no setteroverride
- lastSortedChild → Box?
-
no setter
- owner → LayoutPipelineOwner?
-
no setter
- paintBounds → LayoutRect
-
no setter
- parent → Box?
-
no setter
- parentData ↔ BoxParentData
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollOffsetX ↔ double
-
The current horizontal scroll offset.
getter/setter pairoverride-getter
- scrollOffsetY ↔ double
-
The current vertical scroll offset.
getter/setter pairoverride-getter
- size ↔ LayoutSize
-
getter/setter pair
- sizedByParent ↔ bool
-
getter/setter pair
- textBaseline ↔ LayoutTextBaseline?
-
The text baseline to use for layout calculations.
getter/setter pairoverride-getter
- textDirection ↔ LayoutTextDirection
-
The text direction for this layout.
getter/setter pairoverride-getter
- verticalOverflow ↔ LayoutOverflow
-
getter/setter pair
- viewportSize → LayoutSize
-
The size of the visible viewport.
no setteroverride
Methods
-
addChild(
Box child) → void -
addChildren(
List< Box> children) → void -
attach(
LayoutPipelineOwner owner) → void -
defaultComputeDistanceToFirstActualBaseline(
LayoutTextBaseline baseline) → double? -
defaultComputeDistanceToHighestActualBaseline(
LayoutTextBaseline baseline) → double? -
detach(
) → void -
findChildByKey(
Object key) → ChildLayout? -
override
-
getDistanceToBaseline(
LayoutTextBaseline baseline) → double? -
getDryLayout(
covariant LayoutConstraints constraints) → LayoutSize -
getFirstDryLayout(
LayoutHandle< Layout> layoutHandle) → ChildLayout? -
Creates a dry layout chain starting from the first child.
override
-
getLastDryLayout(
LayoutHandle< Layout> layoutHandle) → ChildLayout? -
Creates a dry layout chain starting from the last child.
override
-
getMaxIntrinsicHeight(
double width) → double -
getMaxIntrinsicWidth(
double height) → double -
getMinIntrinsicHeight(
double width) → double -
getMinIntrinsicWidth(
double height) → double -
layout(
LayoutConstraints constraints, {bool parentUsesSize = false}) → void -
markNeedsLayout(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performLayout(
) → void -
performResize(
) → void -
removeChild(
Box child) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited