modular icon indicating copy to clipboard operation
modular copied to clipboard

bug modular.to.pop()

Open komangnopha opened this issue 5 years ago • 13 comments

using modular.to.pop() after modular.to.pushNamed inside router outlet cause page blank, but when using navigator.of(context).pop() it run normally

komangnopha avatar May 08 '21 04:05 komangnopha

on flutter web, if we press browser back button, navigation stack pop multiple times and causes the binding on current module not found

komangnopha avatar May 08 '21 06:05 komangnopha

I'm experiencing this behavior using Modular.to.popUntil(). When I call it i got an exception Exception: Bad state: Future already completed

ricardogobbo avatar May 10 '21 05:05 ricardogobbo

I think this issue #319 could help, @komangnopha

ricardogobbo avatar May 10 '21 05:05 ricardogobbo

@ricardogobbo are you using router outlet ? in my case when im using router outlet, after pushing navigation with modular.to.pushNamed and go back with modular.to.pop, the page is blank. but when im go back after pushNamed using navigator.of(context).pop, it clear navigation normally (not blank)

komangnopha avatar May 16 '21 11:05 komangnopha

My problem is when using Modular.to.navigate, On the next page when I click on Modular.to.pop(), the page is blank

rickafds avatar May 18 '21 16:05 rickafds

The Navigate works similar to PushAndReplatement, so they will always replace the route, this is normally used to routeOutlets and Web navigations, but we can apply pop :C

Bwolfs2 avatar May 31 '21 22:05 Bwolfs2

The Navigate works similar to PushAndReplatement, so they will always replace the route, this is normally used to routeOutlets and Web navigations, but we can apply pop :C

it means when we using navigate inside router outlet, and then modular.to.pop, router outlet itself also removed and caused page blank ?

komangnopha avatar Jun 01 '21 02:06 komangnopha

have same problem

AlvaroVasconcelos avatar Jun 10 '21 01:06 AlvaroVasconcelos

@AlvaroVasconcelos can u give a sample?

Bwolfs2 avatar Jun 11 '21 01:06 Bwolfs2

Has there been any development done on this? It's currently blocking me, and will result in me having to rip out Modular :/

I need the ability to maintain navigation stacks within RouterOutlets, using push and pop.

cody1024d avatar Feb 01 '22 02:02 cody1024d

Same issue as previously stated. We use Modular.to.navigate("some_route") throughout our app but Modular.to.pop() behaviour seems broken. Any thoughts?

ludovic-alithya avatar Feb 18 '22 17:02 ludovic-alithya

Facing the same issue here in 2023. Anyone was able to resolve this?

FregosoRd avatar Mar 09 '23 07:03 FregosoRd

Hi @FregosoRd, see if this example can help you: https://gist.github.com/eduardoflorence/4d33da7bdb262ef349641fcfac9e10ca

eduardoflorence avatar Mar 09 '23 12:03 eduardoflorence