浏览代码

fixed back button navigation with drawer (#1711)

martyfuhry 2 年之前
父节点
当前提交
b71a86142b
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      mobile/lib/shared/views/tab_controller_page.dart

+ 2 - 4
mobile/lib/shared/views/tab_controller_page.dart

@@ -111,15 +111,13 @@ class TabControllerPage extends ConsumerWidget {
       ],
       ],
       builder: (context, child, animation) {
       builder: (context, child, animation) {
         final tabsRouter = AutoTabsRouter.of(context);
         final tabsRouter = AutoTabsRouter.of(context);
-        final appRouter = AutoRouter.of(context);
         return WillPopScope(
         return WillPopScope(
           onWillPop: () async {
           onWillPop: () async {
             bool atHomeTab = tabsRouter.activeIndex == 0;
             bool atHomeTab = tabsRouter.activeIndex == 0;
             if (!atHomeTab) {
             if (!atHomeTab) {
               tabsRouter.setActiveIndex(0);
               tabsRouter.setActiveIndex(0);
-            } else {
-              appRouter.navigateBack();
-            }
+            } 
+
             return atHomeTab;
             return atHomeTab;
           },
           },
           child: LayoutBuilder(
           child: LayoutBuilder(