show method

void show()

Implementation

void show() {
  RenderBox renderBox =
      widget.targetWidgetKey.currentContext!.findRenderObject() as RenderBox;
  var offset = renderBox.localToGlobal(Offset.zero);

  _showRect = Rect.fromLTWH(
      offset.dx, offset.dy, renderBox.size.width, renderBox.size.height);

  _col = _calculateColCount();
  _row = _calculateRowCount();
  _offset = _calculateOffset(context);

  _entry = OverlayEntry(
    builder: (context) {
      return buildPopupMenuLayout(_offset);
    },
  );

  Overlay.of(context).insert(_entry!);
  _isShow = true;

  widget.stateChanged?.call(true);
}