-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add migration guide for page apis #10523
Conversation
Visit the preview URL for this PR (updated for commit 594455f): https://flutter-docs-prod--pr10523-page-apis-re-iomugcxy.web.app |
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.
Can you add this breaking change to the index file?
title: Navigator's page APIs breaking change | ||
description: > | ||
Changes to Navigator's page APIs. |
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.
Could you add a word or two to be more specific here, as the mentioned APIs could have other breaking changes in the future. Thanks!
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.
good point
all done |
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
fixes #137458 Chagnes: 1. Navigator.pop will always pop page based route 2. add a onDidRemovePage callback to replace onPopPage 3. Page.canPop and Page.onPopInvoked mirrors the PopScope, but in Page class. migration guide flutter/website#10523
Hi @chunhtai, Since this api is deperecated, I think it's better to mention to use class CustomAppPage<T> extends Page<T> {
const CustomAppPage({
super.key,
super.onPopInvoked,
required this.child,
});
final Widget child;
}
CustomAppPage(
key: ValueKey(route),
onPopInvoked: (didPop, result) =>
_routerState.popResult.complete(result),
child: CustomPage(),
), |
migration guide for flutter/flutter#137792
Presubmit checklist