如何在WebviewScaffold上覆盖floatingActionButton

问题描述 投票:0回答:1

我尝试在小部件中打开的 Web 视图上覆盖浮动操作按钮。

"/widget": (_) => new WebviewScaffold(
          clearCache: true,
          clearCookies: true,
          withJavascript: false,
          url: selectedUrl,
          appBar: new AppBar(
            title: new Text("Widget webview"),                
          ),              
          withLocalStorage: true,
          /*floatingActionButton: new FloatingActionButton (
            backgroundColor: Colors.amber,
            onPressed: () {
              Navigator.of(context).push(new MaterialPageRoute(
                  builder: (BuildContext context) => new AddLinkPage()));
            },
            child: new Icon(
              Icons.add,
              color: Colors.black,
            ),
          ),*/
        )

这行不通。

使用

persistentFooterButtons: <Widget>[]
是可以的,但是视图会被切断

我使用flutter_webview_plugin:0.1.5

webview dart flutter
1个回答
3
投票

那是不可能的。

WebView 是一个显示为覆盖层的 Android 视图,因此始终是显示的最顶层内容。

© www.soinside.com 2019 - 2024. All rights reserved.