CalculatePopupPosition typedef

CalculatePopupPosition = Offset Function(Size menuSize, Rect overlayRect, Rect buttonRect)

Used to calculate the position of the popup. menuSize: size of the context menu, always smaller than overlayRect.size overlayRect: rect of the screen excluding keyboard and status bar buttonRect: rect of the button that triggered context menu

Implementation

typedef Offset CalculatePopupPosition(
  Size menuSize,
  Rect overlayRect,
  Rect buttonRect,
);