containsOffset method

bool containsOffset(
  1. Offset offset
)

Check if {offset} is inside the rectangle

Example:

final rect = Rect.fromLTWH(0, 0, 100, 100);
final offset = Offset(50, 50);

rect.containsOffset(offset); // true

Implementation

bool containsOffset(Offset offset) {
  return bottom >= offset.dy && top <= offset.dy && left <= offset.dx && right >= offset.dx;
}