ConstrainedBoxElement class

An element that manages a ConstrainedBox widget.

Inheritance
Available extensions

Constructors

ConstrainedBoxElement(ConstrainedBox widget)
Creates a constrainedbox element for a ConstrainedBox widget.

Properties

childElement ↔ Element?
The child element.
getter/setter pairinherited
childWidget → Widget?
Subclasses must provide the child widget from their specific Widget.
no setteroverride
constraints → BoxConstraints?
The cached constraints from the last layout pass.
no setterinherited
depth ↔ int
The depth of this element in the widget tree.
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
isDirty ↔ bool
Undocumented public member.
getter/setter pairinherited
layoutTraceId → int
Cached tracer ID for layout of this element.
no setterinherited
mounted → bool
Whether this element is currently mounted in the tree.
no setterinherited
owner ↔ BuildOwner?
The BuildOwner managing this element, resolving up the parent chain.
getter/setter pairinherited
paintTraceId → int
Cached tracer ID for painting this element.
no setterinherited
paintTraceMetadata → Map<String, String>?
Custom metadata for paint tracing.
no setterinherited
parent ↔ Element?
The parent element in the widget tree.
getter/setter pairinherited
rebuildTraceId → int
Cached tracer ID for rebuilding this element.
no setterinherited
relativeOffset ↔ Offset
The cached local position assigned by the parent during layout.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Size
The resolved size of the element from the last layout pass.
no setterinherited
treeDepth ↔ int
Undocumented public member.
getter/setter pairinherited
widget ↔ Widget
The widget that this element represents.
getter/setter pairinherited

Methods

dependOnInheritedWidgetOfExactType<T extends InheritedWidget>() → T?
Obtains the nearest inherited widget of the given type T.
inherited
getIntrinsicHeight(int width) → int
Returns the intrinsic height of this element.
override
getIntrinsicWidth(int height) → int
Returns the intrinsic width of this element.
override
hitTest(Point<int> globalPosition, [Offset parentOffset = Offset.zero]) → List<Element>

Available on Element, provided by the HitTestExtension extension

Recursively finds all elements containing the given global coordinate.
layout(BoxConstraints constraints) → Size
Calculates the size of the element based on the given constraints.
inherited
markNeedsBuild() → void
Marks this element as needing a build.
inherited
mount(Element? parent) → void
Adds this element to the tree as a child of parent.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(Buffer buffer, Offset offset) → void
Paints the element and records tracing metrics.
inherited
performLayout(BoxConstraints constraints) → Size
Hook for subclasses to perform layout within the given constraints.
override
performPaint(Buffer buffer, Offset offset) → void
Hook for subclasses to implement actual painting.
override
performRebuild() → void
Performs the actual rebuild and clears the dirty flag.
inherited
reassemble() → void
Called during hot reload to invalidate the element and trigger a rebuild.
inherited
rebuild() → void
Rebuilds the element.
inherited
toString() → String
A string representation of this object.
inherited
unmount() → void
Removes this element from the tree.
inherited
update(Widget newWidget) → void
Updates this element to use a new Widget configuration.
inherited
visitChildren(void visitor(Element child)) → void
Invokes visitor on each child element of this node.
override

Operators

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