flutter_page_transition icon indicating copy to clipboard operation
flutter_page_transition copied to clipboard

leftToRightJoined: _dependents.isEmpty

Open ScottishRoss opened this issue 3 years ago • 5 comments

I'm getting several errors when attempting to use leftToRightJoined.

  • _dependents.isEmpty'
  • Duplicate Global Key detected
  • '_elements.contains(element)': is not true.

In Main, onGenerateRoute the switch statement for that route is:

case '/set_alarm':
            return PageTransition<dynamic>(
              child: SetAlarmScreen(key: key),
              type: PageTransitionType.leftToRightJoined,
              childCurrent: this,
              settings: settings,
              duration: const Duration(seconds: 1),
            );

I can't seem to find out where this issue is coming from, and it only affects the joined transitions. Any ideas?

ScottishRoss avatar Oct 15 '21 13:10 ScottishRoss

What about removing key value on your SetAlarmScreen screen ?

kalismeras61 avatar Oct 15 '21 13:10 kalismeras61

It appeared to be a global navigator key that I had for something else. This has been removed as it's no longer needed.

Though whilst it's now working, it appears to be combining the wrong screens. It's combining screens from earlier in the navigation stack. I'm not sure what I'm doing wrong there?

ScottishRoss avatar Oct 15 '21 13:10 ScottishRoss

I can't help without more details. This is the first time I've heard of it, maybe you should try flutter clean and recompile.

kalismeras61 avatar Oct 15 '21 13:10 kalismeras61

I've tried that I'm afraid. I'm pretty sure it has something to do with the nav stack. Here's a short video of my app from splash screen.

It goes: Splash screen -> Splash Screen (with animation) -> pushNamedAndRemoveUntil -> IntroScreen -> pushNamedAndRemoveUntil -> HomeScreen -> pushNamed (this is the one with the page transition or leftToRightJoined) -> setAlarm.

As you can see in the video you see previous screens from this nav stack, that should be removed?

Video Link

ScottishRoss avatar Oct 15 '21 14:10 ScottishRoss

Is there any other information I can provide to help?

ScottishRoss avatar Oct 21 '21 08:10 ScottishRoss