offsets property

Iterable<Offset> offsets

Iterable of all offsets within this rectangle.

The offsets are ordered from left to right, top to bottom.

final rect = Rect(1, 1, 2, 2);

for (final offset in rect.offsets) {
  print(offset);
}

// Output:
// Offset(1, 1)
// Offset(2, 1)
// Offset(1, 2)
// Offset(2, 2)

Implementation

Iterable<Offset> get offsets => _RectOffsets(this);