calculatePanning method

void calculatePanning(
  1. Offset offset
)

Calculates the offset based on the provided offset.

Implementation

void calculatePanning(Offset offset) {
  Offset position =
      (floatingKey.currentContext?.findRenderObject() as RenderBox?)
          ?.localToGlobal(Offset.zero) ??
      Offset.zero;

  this.offset = Offset(offset.dx - position.dx, offset.dy - position.dy);
}