1

I don't even think this is possible but, what I'm looking for is to allow the showMenu() popup to go beyond the application window.

Currently, I'm using:

showMenu(
    context: context,
    items: <PopupMenuEntry>[
      PopupMenuItem(
        value: 1,
        child: Row(
          children: const <Widget>[
            Icon(Icons.delete),
            Text("Delete"),
          ],
        ),
      )
    ], 
    position: RelativeRect.fromLTRB(0, 0,0,0),
);

Simply changing the position field to be below the height bounds of the application window doesn't work for me.

Edit: I do know that it is possible with a C# desktop app where a dropdown popup can go outside the bounds of the application window, so I figured flutter could do this as well.

exceptionsAreBad
  • 573
  • 2
  • 5
  • 17
  • Why do you want your popup to go outside of window? – Diwyansh Dec 14 '21 at 15:32
  • Well truthfully, I'm trying to make a toolbar at the top that is height of 100, that when on hover or click of some icons, a dropdown that has options span downwards. Trying to save screen space. I guess I could just make the window borders transparent and the background transparent and increase the height of the application ? – exceptionsAreBad Dec 14 '21 at 15:56
  • Well trying what I said in the above comment, setting scaffolds background color to transparent renders a black background. – exceptionsAreBad Dec 14 '21 at 16:10
  • Scaffold provides us Material design with white background if you give it transparent then it will show it's parent background which is black. – Diwyansh Dec 14 '21 at 16:36
  • You may be able to do your transparency idea by using the flutter_acrylic plugin. – xdaimon Mar 31 '22 at 17:11

1 Answers1

2

Currently Flutter only supports a single window, so there's no way to do this from Dart at the moment.

If it's a critical feature for your application, you would need to build a plugin that shows a native popup. The menu's UI would need to be native as well, unless you bring up a second Flutter engine just to draw it.

smorgan
  • 20,228
  • 3
  • 47
  • 55