operator & method Null safety

Rect operator &(
  1. Size other
)

Rectangle constructor operator.

Combines an Offset and a Size to form a Rect whose top-left coordinate is the point given by adding this offset, the left-hand-side operand, to the origin, and whose size is the right-hand-side operand.

Rect myRect = Offset.zero & const Size(100.0, 100.0);
// same as: Rect.fromLTWH(0.0, 0.0, 100.0, 100.0)

Implementation

Rect operator &(Size other) => Rect.fromLTWH(dx, dy, other.width, other.height);