getOffset static method

Offset? getOffset(
  1. BuildContext? context
)

Implementation

static Offset? getOffset(BuildContext? context) {
  RenderObject? box = context?.findRenderObject();
  if (box is RenderBox) {
    return box.localToGlobal(Offset.zero);
  }
  return null;
}