Rectangle class

A rectangle with specified origin and size.

Example:

// Create rectangle with x, y, width, height
Rectangle rect1 = Rectangle(10, 20, 100, 150);
print(
 "Created rectangle: x=${rect1.x}, y=${rect1.y}, width=${rect1.width}, height=${rect1.height}",
);

Constructors

Rectangle(int x, int y, int width, int height)
Default constructor.

Properties

hashCode int
The hash code for this object.
no setterinherited
height int
rectangle's height.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
rectangle's width.
getter/setter pair
x int
rectangle's origin x coordinate.
getter/setter pair
y int
rectangle's origin y coordinate.
getter/setter pair

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