getx icon indicating copy to clipboard operation
getx copied to clipboard

GetRouterOutlet replacing its ancorRoute even with participatesInRootNavigator: true

Open victorths opened this issue 2 years ago • 5 comments

When using two nested GetRouterOutles and navigating inside the deeper one, this is replacing the topmost page.

I created a POC to exemplify the case because it has many files: https://github.com/victorths/getx_nested_router_outlets

Steps to reproduce the behavior:

  1. Go to HomePage
  2. Click on '...' menu and navigate to HomeB (it works as intended)
  3. Click on '..' menu and navigate to HomeA (it replaces the Home app bar)
  4. See error

When navigating to HomeA the Home AppBar should not desapear.

Flutter Version: 3.3.6

Getx Version: 4.6.5

victorths avatar Dec 05 '22 17:12 victorths

Thanks for submitting this. I'm going to work on it this week

jonataslaw avatar Dec 07 '22 04:12 jonataslaw

Hello. I am facing same issue... any update here?

InseokRyu avatar Dec 13 '22 09:12 InseokRyu

@jonataslaw did you manage to solve it?

victorths avatar Dec 15 '22 12:12 victorths

in version 5.0.0-release-candidate-5, i encountered the same situation, how to solve it?

@jonataslaw Looking forward to your reply

jhmarryme avatar Oct 14 '23 08:10 jhmarryme

Hello all! I use Getx version 5.0.0-release-candidate-5. i had the same issue, and i think i found solution. in GetRouterOutler we need to use filterPages

 GetRouterOutlet(
        anchorRoute: Routes.home,
        initialRoute: Routes.orders,
        filterPages: (page) {
          return page.takeWhile((p) => p.participatesInRootNavigator == null);
        },
      ),

egortabula avatar Apr 26 '24 07:04 egortabula