title: How to dismiss showMenu popup by any user action outside the popup
body: <p>I am using <a href="https://api.flutter.dev/flutter/material/showMenu.html" rel="nofollow noreferrer">showMenu</a> function for displaying the pop up. Although it works without any issues, user has to tap outside of the popup to dismiss it.</p>
  <p>This is how I implemented it.</p>
  <pre><code>    //for showing  the pop up on click of the menu
      GestureDetector(
              child: const Icon(Icons.menu),
              onTapDown: (TapDownDetails details) {
                _showPopupMenu(context, details.globalPosition);
              }),
  
   
      //show menu
      _showPopupMenu(BuildContext context, Offset offset) async{
      double left = offset.dx;
      double top = offset.dy;
      await showMenu(
          context: context,
          position: RelativeRect.fromLTRB(left, top, 16, 0),
          useRootNavigator: true,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(12.0))),
        items: [
          PopUpMenuItem(some child),
          PopUpMenuItem(some child),
          PopUpMenuItem(some child),
          ]
        ); 
        }
  </code></pre>
  <p>How can I dismiss the pop up, not only by tap, also by any kind of user actions which is happening outside the pop up area?</p>