drawRect method
Draws a rectangle using the specified coordinates and dimensions.
The rectangle is drawn starting from the top-left point (x
, y
) and
with the specified width
and height
.
Returns the current Graphics instance, allowing for method chaining.
Implementation
Graphics drawRect(double x, double y, double width, double height) {
_path!.addRect(
Rect.fromLTWH(x, y, width, height),
);
return this;
}