-
Notifications
You must be signed in to change notification settings - Fork 28.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
docs: Clarify Transform.rotate origin interaction with alignment #163934
base: master
Are you sure you want to change the base?
Conversation
This commit improves the documentation for Transform.rotate's origin property to clarify its interaction with the alignment property. It emphasizes that the origin offset is applied after the alignment transformation, and provides examples to avoid common misinterpretations.
@SunkenInTime Heads up that there are failures. I'll try to take a look at this later, thanks for the PR! |
@justinmc |
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.
Hey @SunkenInTime welcome! Thanks for contributing!
It looks like the failures are caused by your change, from the output:
RUNNING: cd .; bin/cache/dart-sdk/bin/dart --enable-asserts /b/s/w/ir/x/w/flutter/dev/bots/analyze_snippet_code.dart --verbose
workingDirectory: /b/s/w/ir/x/w/flutter, executable: /b/s/w/ir/x/w/flutter/bin/cache/dart-sdk/bin/dart, arguments: [--enable-asserts, /b/s/w/ir/x/w/flutter/dev/bots/analyze_snippet_code.dart, --verbose]
packages/flutter/lib/src/widgets/basic.dart:1737:17: Use 'const' with the constructor to improve performance (expression) (prefer_const_constructors)
packages/flutter/lib/src/widgets/basic.dart:1738:16: Abstract classes can't be instantiated (expression) (instantiate_abstract_class)
packages/flutter/lib/src/widgets/basic.dart:1738:16: Use 'const' with the constructor to improve performance (expression) (prefer_const_constructors)
packages/flutter/lib/src/widgets/basic.dart:1747:17: Use 'const' with the constructor to improve performance (expression) (prefer_const_constructors)
packages/flutter/lib/src/widgets/basic.dart:1748:16: Abstract classes can't be instantiated (expression) (instantiate_abstract_class)
packages/flutter/lib/src/widgets/basic.dart:1748:16: Use 'const' with the constructor to improve performance (expression) (prefer_const_constructors)
Found 6 snippet code errors.
Can you update to resolve these?
Hi @Piinks , thanks for the heads up! I didn't realize that it lints the code snippets 😭. I've made the changes to the affected lines. I would also like to know if the text widgets used there are appropriate. Thanks again! |
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 for helping to make this nuance more clear for everyone. Just a bunch of suggestions about the wording, except for the part about double quotes, which I think is breaking the analyzer.
@justinmc Apologies for taking so long, just made the proposed fixes to the commit! Thanks for the guidance 😊 |
This commit improves the documentation for Transform.rotate's origin property to clarify its interaction with the alignment property.
Before: The documentation did not clearly explain how the origin offset interacts with the alignment property, potentially leading to confusion about the actual rotation point.
After: The documentation now emphasizes that the origin offset is applied after the alignment transformation, and provides examples to avoid common misinterpretations.
This change ensures developers can correctly position the rotation point.