-
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 page route animation article to cookbook #2812
add page route animation article to cookbook #2812
Conversation
will re-add after updating flutter/assets-for-api-docs
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.
A few conventions that you didn’t know but, once those are fixed, it looks great!! Go ahead and submit those fixes and then merge. I’m fine with your reordering of the pages.
LGTM (with some small changes requested.)
A design language, such as Material, defines standard behaviors when | ||
transitioning between routes (or screens). Sometimes, though, a custom | ||
transition between screens can make an app more unique. To help, | ||
[PageRouteBuilder](https://api.flutter.dev/flutter/widgets/PageRouteBuilder-class.html) |
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.
Generally, we use the following format for links. (We didn’t always do that, but it’s now part of our recommended guidelines.) Also, we use macros for the common websites. So:
To help, PageRouteBuilder provides an Animation…
It makes the text more readable and it makes things a lot easier if we change the URLs for our API website, for example. (Which we did last year.)
https://github.com/dart-lang/site-shared/wiki/Writing-for-Dart-and-Flutter-websites
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.
👍 fixed
|
||
{{site.alert.note}} | ||
|
||
Note: The `child` parameter in transitionsBuilder is the widget returned from |
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.
Delete the empty line above and below the note text. We indent notes by two chars, so:
{{site.alert.note}}
The child
parameter …
{{site.alert.end}}
Also, the site.alert macro inserts the “Note:” text, so you can delete that.
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.
👍 fixed
constructor). In this case, the Offset is a 2D vector for the | ||
[FractionalTranslation](https://api.flutter.dev/flutter/widgets/FractionalTranslation-class.html) | ||
widget. Setting the `dy` argument to 1 represents a vertical translation one | ||
full height of the page. |
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.
Nice addition!
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.
thanks!
@sfshaza2 thanks for the review - this is ready for another look. |
* add page route animation article * add links to page route article * remove google drive link will re-add after updating flutter/assets-for-api-docs * add metadata * reword first paragraph * add page-route-animation GIF * specify dart as the language in code blocks * make prev and next fields match alphabetical order * use {{site.api}} for API links * fix note formatting
This adds the animation article to the cookbook.
@sfshaza2 the cookbook index lists articles alphabetically, but concept-wise I think this should be the third article. Let me know what you think and I can revert 7310a27
FYI @RedBrogdon