getWidgetPosition function
Offset
getWidgetPosition({
- GlobalKey<
State< ? key,StatefulWidget> > - BuildContext? context,
- RenderObject? parent,
Implementation
Offset getWidgetPosition({
GlobalKey? key,
BuildContext? context,
RenderObject? parent,
}) {
BuildContext ctx = context ?? key!.currentContext!;
final renderBox = ctx.findRenderObject() as RenderBox;
return renderBox.localToGlobal(Offset.zero, ancestor: parent);
}