GithubHelp home page GithubHelp logo

Navigation doesn't work properly, if `AutoRouteGuard.onNavigation` method is overridden as async method about auto_route_library HOT 3 CLOSED

MartinAKovachev avatar MartinAKovachev commented on July 19, 2024 2
Navigation doesn't work properly, if `AutoRouteGuard.onNavigation` method is overridden as async method

from auto_route_library.

Comments (3)

MartinAKovachev avatar MartinAKovachev commented on July 19, 2024 1

Closed, the issue was in another package: https://pub.dev/packages/overlay_support

from auto_route_library.

Milad-Akarie avatar Milad-Akarie commented on July 19, 2024

Hey @MartinAKovachev marking navigation as async should not have any effect because the method is not being awaited, the NavigatorResolver is.
what kind of strange behavior are you getting?

from auto_route_library.

MartinAKovachev avatar MartinAKovachev commented on July 19, 2024

Hey @MartinAKovachev marking navigation as async should not have any effect because the method is not being awaited, the NavigatorResolver is. what kind of strange behavior are you getting?

Hey @Milad-Akarie,
Ok, if using onNavigation as async is correct, then something else should be the issue. I will keep you updated if we have other questions regarding that topic. The case is that we restart our app by using RestartWidget in which we update the key (so the rest of the tree will be updated) and it is a root widget above the MaterialApp widget. But for some reason the onNavigation is called 2 times with / path when we restart the tree, but we see a white screen instead of / main route. Seems like an old instance of router is being used, but still can't find the reason for happening.
If we immediately call resolver.next() without awaiting anything before that, then it navigates to the / main route (again onNavigation is called 2 times but at least it works).

from auto_route_library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.