You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The back button appears for a few moments while I replace a route with Navigator 2.0. #67277
When showSignIn changes value, I want to switch from one screen to another. It works, but the back button appears for a few moments in the AppBar. Is this normal?
I tried on the master channel, but I had the same problem.
I imagined several solutions to solve this issue, but they seem a little strange to me:
Put the same key on both pages.
Create a single page (Authentication), and change widget according to showSignIn inside.
@johynpapin The back button is a default setting. If you don't want it to show upon toggle, you may set automaticallyImplyLeading: false,, that'll not show the appbar back button.
@darshankawar
I believe that the problem has not been solved.
When there is a replace route, canPop() becomes 'true' causing the back button to appear for a few milliseconds.
cool! I'm studying Translate Delegate and I really didn't see anything wrong with the standard Delegate logic. I believe that Navigator.canPop() is True during the transition because there are actually 2 entryOverlay in the history.
Finished investigating, this is a bug in route.canpop that it check whether the route is the first or not, it return false when the route is completed but still on the route stack, this cause it to return true for route.canpop.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
darshankawar commentedon Oct 5, 2020
@johynpapin
Please provide
flutter doctor -vand a complete minimal code sample that we can copy paste and run in IDE to see the issue.Thanks.
darshankawar commentedon Oct 6, 2020
@johynpapin The back button is a default setting. If you don't want it to show upon toggle, you may set
automaticallyImplyLeading: false,, that'll not show the appbar back button.I am going ahead and closing it, as it's not an issue. If you disagree, write in comments and I'll reopen.
Thanks.
jacobaraujo7 commentedon Oct 31, 2020
@darshankawar

I believe that the problem has not been solved.
When there is a replace route, canPop() becomes 'true' causing the back button to appear for a few milliseconds.
jacobaraujo7 commentedon Nov 3, 2020
cc @chunhtai
darshankawar commentedon Nov 4, 2020
flutter doctor -v
jacobaraujo7 commentedon Nov 5, 2020
@chunhtai Why
markForReplacenot exist in RouteTransitionRecord?I believe that this would solve this bug
chunhtai commentedon Nov 5, 2020
@jacobaraujo7 if you want to replace B with A you can use B.markForComplete and A.markForAdd to achieve the same result
jacobaraujo7 commentedon Nov 6, 2020
But the A.markForAdd wouldn't show the input animation, right?
chunhtai commentedon Nov 6, 2020
@jacobaraujo7 yes, replace do not show animation too. or are you talking about pushAndReplace? in that case you can do A.markForPush
jacobaraujo7 commentedon Nov 6, 2020
cool! I'm studying Translate Delegate and I really didn't see anything wrong with the standard Delegate logic. I believe that Navigator.canPop() is True during the transition because there are actually 2 entryOverlay in the history.
jacobaraujo7 commentedon Nov 24, 2020
Hello @chunhtai
Any news?
chunhtai commentedon Nov 25, 2020
@jacobaraujo7 Sorry for the late reply, I am currently overwhelmed by some high priority issues. I will get to this issue by the end of the next week
chunhtai commentedon Dec 8, 2020
Finished investigating, this is a bug in route.canpop that it check whether the route is the first or not, it return false when the route is completed but still on the route stack, this cause it to return true for route.canpop.
I will put up a fix
atnpem commentedon Mar 24, 2021
Hello,
I'm facing with this issue.
RPReplay_Final1616577793.mov
Flutter doctor:
My sample code to reproduce:
Thank you for your help.
github-actions commentedon Aug 4, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.