PositionedComponentInstance class Layout
Represents a ComponentInstance with its assigned Rect bounds, optionally linked to the parent component responsible for rendering it.
Used by the LayoutEngine to provide the renderer with the final layout result for each component.
See also
- LayoutEngine — Produces positioned components.
- Rect — The position and size of the component.
Example
final positioned = PositionedComponentInstance(
componentInstance: myComponent,
rect: Rect(x: 0, y: 0, width: 10, height: 2),
parentComponentInstance: parent,
);
Constructors
- PositionedComponentInstance.new({required ComponentInstance componentInstance, required Rect rect, ComponentInstance? parentComponentInstance})
- Creates a positioned component instance with the given bounds.
Properties
- componentInstance ↔ ComponentInstance
-
The component being positioned.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- parentComponentInstance ↔ ComponentInstance?
-
The parent component that will render this instance,
or
null
if the renderer handles it directly.getter/setter pair - rect → Rect
-
The final bounds of the component.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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