소스 검색

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();
       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);