containsXY method
Returns true
if this rectangle contains the coordinates x
,y
.
Implementation
bool containsXY(num x, num y) {
final mx = this.x;
final my = this.y;
var w = width;
var h = height;
return w > 0 && h > 0 && x >= mx && x < (mx + w) && y >= my && y < (my + h);
}