Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dart 如何在Flatter中通过WebviewScaffold显示AlertDialog?_Dart_Flutter_Android Alertdialog_Webviewscaffold - Fatal编程技术网

Dart 如何在Flatter中通过WebviewScaffold显示AlertDialog?

Dart 如何在Flatter中通过WebviewScaffold显示AlertDialog?,dart,flutter,android-alertdialog,webviewscaffold,Dart,Flutter,Android Alertdialog,Webviewscaffold,我将在WebviewScaffold上打开AlertDialog,但它没有显示。当我打开AlertDialog时,它出现在WebviewScaffold下 下面是我的代码 child: Container( child: WebviewScaffold( url: agreementURL, withZoom: false, withLocalStorage: false, hidden: true, withJavascript: true, )

我将在
WebviewScaffold
上打开
AlertDialog
,但它没有显示。当我打开
AlertDialog
时,它出现在
WebviewScaffold

下面是我的代码

child: Container(
  child: WebviewScaffold(
    url: agreementURL,
    withZoom: false,
    withLocalStorage: false,
    hidden: true,
    withJavascript: true,
  ),
),
当internet不可用时,我将显示
警报对话框
,但该对话框将显示在
WebviewScaffold


谢谢。

只要您想显示对话框,就可以使用隐藏方法来隐藏网络视图

代码:

//显示对话框时

webviewPlugin. hide() ;

webview未集成在小部件树中,它是位于颤振视图顶部的本机视图。您将无法使用snackbar和对话框。好的,谢谢您的评论。
webviewPlugin. hide() ;