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.
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 setterinherited
- height → double
-
The height of the rectangle.
final
- horizontalCenter → double
-
no setter
- left → double
-
The left edge coordinate.
final
- right → double
-
The right edge coordinate (calculated as left + width).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- top → double
-
The top edge coordinate.
final
- verticalCenter → double
-
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 -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- zero → const LayoutRect
- A rectangle with zero position and size.