Clarify route transition animations#186552
Open
mvincentong wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request enhances the documentation for PageRouteBuilder and RouteTransitionsBuilder by detailing the roles of the animation and secondaryAnimation parameters in route transitions and coordination. The review feedback recommends using square brackets for parameter references to ensure consistency with Flutter documentation standards and suggests providing more specific details regarding transition coordination methods.
4548e6c to
6e2f225
Compare
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.
Issue: fixes #23206
The
PageRouteBuilderandRouteTransitionsBuilderdocs pointed readers toModalRoute.buildTransitions, but the callback docs themselves did not explain the practical difference between the primaryanimationandsecondaryAnimationparameters.Fix:
Clarify that
animationdrives the route's own push/pop transition, whilesecondaryAnimationlets the route coordinate with a route pushed above it. The docs now also mention thatsecondaryAnimationonly runs when the adjacent routes allow transition coordination throughcanTransitionTo/canTransitionFrom.Tests:
./bin/dart format --output=none --set-exit-if-changed packages/flutter/lib/src/widgets/routes.dart packages/flutter/lib/src/widgets/pages.dart./bin/flutter analyze packages/flutter/lib/src/widgets/routes.dart packages/flutter/lib/src/widgets/pages.dartgit diff --checkRisk:
Docs-only change in two route API comments. No runtime behavior changes.