-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Navigator should call didpop when popping page based route #170376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -5581,7 +5581,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res | |||
if (entry.currentState.index <= _RouteLifecycle.idle.index) { | |||
// The entry may have been disposed if the pop finishes synchronously. | |||
assert(entry.route._popCompleter.isCompleted); | |||
entry.currentState = _RouteLifecycle.popping; | |||
entry.currentState = _RouteLifecycle.pop; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in flush history update, pop will notify observer and then transition to popping. I can't really find out why I made this change in the first place, but I think reverting this back to pop should be fine as long as no other error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree here. Makes sense to me to keep it as pop
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@@ -5581,7 +5581,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res | |||
if (entry.currentState.index <= _RouteLifecycle.idle.index) { | |||
// The entry may have been disposed if the pop finishes synchronously. | |||
assert(entry.route._popCompleter.isCompleted); | |||
entry.currentState = _RouteLifecycle.popping; | |||
entry.currentState = _RouteLifecycle.pop; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree here. Makes sense to me to keep it as pop
.
as title
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.