LayoutRect class

Represents a rectangle with position and size.

Used to define the bounds of layout elements and perform geometric calculations like expanding to include child bounds.

Implementers

Constructors

LayoutRect.fromLTRB(double left, double top, double right, double bottom)
Creates a rectangle from left, top, right, and bottom coordinates.
const
LayoutRect.fromLTWH(double left, double top, double width, double height)
Creates a rectangle from left, top, width, and height.
const

Properties

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

Methods

expandToInclude(LayoutRect childBounds) LayoutRect
Expands this rectangle to include the bounds of another rectangle.
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.
toString() String
A string representation of this object.
override

Operators

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

Constants

zero → const LayoutRect
A rectangle with zero position and size.