/*
 * @author lsy
 * @date   2020/6/30
 **/
import 'package:flutter/cupertino.dart';

class PosUtil {
  static Offset findPos(GlobalKey globalKey) {
    Offset offset;
    if (globalKey.currentContext != null) {
      RenderBox box = globalKey.currentContext.findRenderObject();
      offset = box.localToGlobal(Offset.zero);
    }
    return offset;
  }
}