فهرست منبع

Allow back button to be pressed on dialog displayed over web view.

Clinton Volzke 6 سال پیش
والد
کامیت
53921a9aa0
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      lib/src/webview_scaffold.dart

+ 2 - 2
lib/src/webview_scaffold.dart

@@ -84,8 +84,8 @@ class _WebviewScaffoldState extends State<WebviewScaffold> {
       final pop = await _topMostRoute.willPop();
       final pop = await _topMostRoute.willPop();
       if (pop == RoutePopDisposition.pop) {
       if (pop == RoutePopDisposition.pop) {
         // Close the webview if it's on the route at the top of the stack.
         // Close the webview if it's on the route at the top of the stack.
-        final isEditorOnTopMostRoute = _topMostRoute == ModalRoute.of(context);
-        if (isEditorOnTopMostRoute) {
+        final isOnTopMostRoute = _topMostRoute == ModalRoute.of(context);
+        if (isOnTopMostRoute) {
           webviewReference.close();
           webviewReference.close();
         }
         }
         Navigator.pop(context);
         Navigator.pop(context);