ParentRect class

A rectangle that includes information about parent edge insets.

ParentRect extends LayoutRect to include edge information from the parent container. This is useful for calculating positions relative to parent padding or bounds while maintaining the rectangle's position and size.

Combines both absolute positioning (left, top, width, height) with relative edge distances from the parent container's bounds.

Inheritance

Constructors

ParentRect.fromLTWH(double left, double top, double width, double height, ParentEdge edges)
Creates a ParentRect from left, top, width, height, and edges.
const

Properties

bottom double
The bottom edge coordinate (calculated as top + height).
no setterinherited
edges ParentEdge
The edge distances from the parent container's bounds.
final
hashCode int
The hash code for this object.
no setterinherited
height double
The height of the rectangle.
finalinherited
horizontalCenter double
The x-coordinate of the horizontal center of this rectangle.
no setterinherited
horizontalRange LayoutRange
The horizontal range (left to right) of this rectangle.
no setterinherited
left double
The left edge coordinate.
finalinherited
The right edge coordinate (calculated as left + width).
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size LayoutSize
The size (width and height) of this rectangle.
no setterinherited
top double
The top edge coordinate.
finalinherited
verticalCenter double
The y-coordinate of the vertical center of this rectangle.
no setterinherited
verticalRange LayoutRange
The vertical range (top to bottom) of this rectangle.
no setterinherited
width double
The width of the rectangle.
finalinherited

Methods

expandToInclude(LayoutRect childBounds) LayoutRect
Expands this rectangle to include the bounds of another rectangle.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overlaps(LayoutRect other) bool
Checks if this rectangle overlaps with another rectangle.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

zero → const ParentRect
A ParentRect with all dimensions and edges set to zero.