ChildLayoutDryDelegate class
A delegate that performs dry layout operations on behalf of a child.
ChildLayoutDryDelegate wraps an existing ChildLayout and provides the same interface, but performs operations without side effects. It's used for measuring layouts without actually positioning elements.
This class is particularly useful for:
- Calculating intrinsic sizes
- Measuring layouts for scrolling calculations
- Performing "what-if" layout scenarios
- Mixed-in types
Constructors
- ChildLayoutDryDelegate.new(ChildLayout child, ChildLayoutCache layoutCache)
- Creates a dry layout delegate for the given child.
Properties
- child → ChildLayout
-
The actual child layout being delegated to.
final
- debugKey → Object?
-
Debug key for identifying this child in debug output.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- layoutCache → ChildLayoutCache
-
The cache to use for this dry layout operation.
final
- layoutData → LayoutData
-
Returns the child's layout data.
no setteroverride
- nextSibling ↔ ChildLayout?
-
The next sibling in the dry layout chain.
getter/setter pairoverride-getter
- offset → LayoutOffset
-
Throws an exception - offset is not supported in dry layout.
no setteroverride
- previousSibling ↔ ChildLayout?
-
The previous sibling in the dry layout chain.
getter/setter pairoverride-getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → LayoutSize
-
Throws an exception - size is not available in dry layout.
no setteroverride
Methods
-
clearCache(
) → void -
Clears the cache (no-op for dry delegates).
override
-
dryLayout(
LayoutConstraints constraints) → LayoutSize -
Performs a dry layout on the child.
override
-
getDistanceToBaseline(
LayoutTextBaseline baseline) → double -
Gets the distance to baseline from the child.
override
-
getMaxIntrinsicHeight(
double width) → double -
Gets the maximum intrinsic height from the child.
override
-
getMaxIntrinsicWidth(
double height) → double -
Gets the maximum intrinsic width from the child.
override
-
getMinIntrinsicHeight(
double width) → double -
Gets the minimum intrinsic height from the child.
override
-
getMinIntrinsicWidth(
double height) → double -
Gets the minimum intrinsic width from the child.
override
-
layout(
LayoutOffset offset, LayoutSize size, OverflowBounds overflowBounds, {LayoutOffset? revealOffset}) → void -
Throws an exception - actual layout is not supported in dry operations.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
backwardCopy(
ChildLayout? lastChild, LayoutHandle< Layout> layoutHandle) → ChildLayoutDryDelegate? - Creates a backward-linked chain of dry layout delegates.
-
forwardCopy(
ChildLayout? firstChild, LayoutHandle< Layout> layoutHandle) → ChildLayoutDryDelegate? - Creates a forward-linked chain of dry layout delegates.