Add migration guide for page apis#10523
Merged
sfshaza2 merged 3 commits intoflutter:mainfrom May 9, 2024
Merged
Conversation
8 tasks
Collaborator
|
Visit the preview URL for this PR (updated for commit 594455f): https://flutter-docs-prod--pr10523-page-apis-re-iomugcxy.web.app |
sfshaza2
reviewed
May 8, 2024
Contributor
sfshaza2
left a comment
There was a problem hiding this comment.
Can you add this breaking change to the index file?
parlough
reviewed
May 8, 2024
Comment on lines
+2
to
+4
| title: Navigator's page APIs breaking change | ||
| description: > | ||
| Changes to Navigator's page APIs. |
Member
There was a problem hiding this comment.
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!
Contributor
Author
|
all done |
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
May 13, 2024
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
Contributor
|
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(),
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
migration guide for flutter/flutter#137792
Presubmit checklist