Browse Source

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

Clinton Volzke 6 years ago
parent
commit
53921a9aa0
1 changed files with 2 additions and 2 deletions
  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();
       if (pop == RoutePopDisposition.pop) {
         // 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();
         }
         Navigator.pop(context);