getMoveAreaBounds method

Rectangle? getMoveAreaBounds(
  1. Rect visibleWorldRect
)

Area where the camera center is allowed to move when CameraConfig.moveOnlyMapArea is enabled. Infinite maps override this to release the axis(es) that never end.

Implementation

Rectangle? getMoveAreaBounds(Rect visibleWorldRect) {
  final rect = getMapRect().deflatexy(
    visibleWorldRect.width / 2,
    visibleWorldRect.height / 2,
  );
  return Rectangle.fromRect(rect);
}