shiftToNormal method

(Rect, Rect) shiftToNormal(
  1. Rect rect
)

Returns two rectangles (current and rect) where one is positioned at a (0,0) offset

Implementation

(Rect, Rect) shiftToNormal(Rect rect) {
  final dx = 0.0 - min(left, rect.left);
  final dy = 0.0 - min(top, rect.top);
  final offset = Offset(dx, dy);
  final result = (shift(offset), rect.shift(offset));
  return result;
}