Skip to content

Conversation

@SunkenInTime
Copy link
Contributor

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.

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.
@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Feb 22, 2025
@justinmc
Copy link
Contributor

@SunkenInTime Heads up that there are failures. I'll try to take a look at this later, thanks for the PR!

@SunkenInTime
Copy link
Contributor Author

SunkenInTime commented Feb 26, 2025

@justinmc
Thanks for the heads up about the test failures. I've looked into it, but I'm still puzzled since my changes were limited to comments in the basic.dart file. The failing tests are Linux analyze, which seem unrelated to the documentation change. I've rebased against the latest flutter:master, but the failures persist. I'm not familiar with the analyzer or framework test setup, so I'm not sure where to start debugging. Would you (or someone else on the team) be able to take a look and offer some guidance on how to resolve these failures? I really appreciate you taking the time to look into this!

Copy link
Contributor

@Piinks Piinks left a 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?

@SunkenInTime
Copy link
Contributor Author

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!

Copy link
Contributor

@justinmc justinmc left a 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.

@SunkenInTime
Copy link
Contributor Author

@justinmc Apologies for taking so long, just made the proposed fixes to the commit! Thanks for the guidance 😊

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the analyzer is still failing, can you take a look?

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #163934 at sha 80c7ed2

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Apr 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2025
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
…tter#163934)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

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.

---------

Co-authored-by: Greg Price <[email protected]>
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…tter#163934)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

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.

---------

Co-authored-by: Greg Price <[email protected]>
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
…tter#163934)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

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.

---------

Co-authored-by: Greg Price <[email protected]>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
…tter#163934)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

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.

---------

Co-authored-by: Greg Price <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

d: api docs Issues with https://api.flutter.dev/ framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants