flutter webview (plugin) occluding popup menu

248 views
Skip to first unread message

dwn

unread,
Nov 23, 2018, 8:23:40 PM11/23/18
to Flutter Dev
I'm using flutter_webview_plugin, and I need to display a popup menu on top of it. However, the menu does not appear unless I resize the webview so that it does not occlude it. There do not seem to be any elevation/z-index options. How can I place a popup menu on top of the webview?

Thank you

Dan N

In case it matters - here's how I launch the webview:

flutterWebviewPlugin.launch(nextUrl, clearCache: clearCache,
rect: new Rect.fromLTWH(
0.0, 0.0,
size.width, size.height - 45),
userAgent: kAndroidUserAgent);

Here's how I set the popup menu (opens OnTap from a GestureDetector column):

final result = await showMenu(
position: new RelativeRect.fromLTRB(size.width * .5, size.height - 210, size.width, size.height - 45),
context: context,
items: <PopupMenuItem<String>>[
const PopupMenuItem<String>(
child: Text('ENGLISH'), value: 'ENGLISH'),
const PopupMenuItem<String>(
child: Text('ESPANOL'), value: 'ESPANOL'),
const PopupMenuItem<String>(
child: Text('About'), value: 'About'),
],
);

Reply all
Reply to author
Forward
0 new messages