-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Improve SweepGradient angle and TileMode documentation
#172406
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
Improve SweepGradient angle and TileMode documentation
#172406
Conversation
- Clarify angle measurement in radians from positive x-axis - Document angle normalization behavior for values outside [0, 2π] - Explain how tileMode affects rendering outside the angular sector - Add detailed descriptions of each tileMode's effect on sweep gradients - Fixes flutter#166206
- Clarify angle measurement in radians from positive x-axis - Document angle normalization behavior for values outside [0, 2π] - Explain how tileMode affects rendering outside the angular sector - Add detailed descriptions of each tileMode's effect on sweep gradients - Fixes flutter#166206
- Restored ImageFilter documentation - Added detailed sweep gradient behavior for each TileMode - Clarified how tileMode affects rendering outside the angular sector - Maintained all existing documentation for other gradient types
|
@SalehTZ Awesome work on this PR! This is the perfect fix. Clarifying the coordinate system and adding that example using TileMode.decal is exactly what was needed. This will save a lot of developers from future headaches. Looks great to me. Nice job! |
|
umm, I cannot understand why this test fails. Can anyone help? |
…hTZ/flutter into enhance-SweepGradient-documentation
Co-authored-by: Victor Sanni <[email protected]>
Co-authored-by: Victor Sanni <[email protected]>
|
Google test failed! :(
|
justinmc
left a comment
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.
Renewing my LGTM 👍 . Thanks for fixing the nits.
I assume the Google test failures were a fluke since this is a docs-only change. I'll autosubmit this.
|
autosubmit label was removed for flutter/flutter/172406, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
Thanks everybody for your attention and reviews. Could it be failing because of the |
|
The failing test looked like a timeout so I reran it. |
|
Phew, now it's green. |
flutter/flutter@52af7a5...0a2906b 2025-08-16 [email protected] Improve `SweepGradient` angle and `TileMode` documentation (flutter/flutter#172406) 2025-08-16 [email protected] Roll Skia from 1e148cada9d4 to 16dbd908dcab (1 revision) (flutter/flutter#173901) 2025-08-16 [email protected] Roll Skia from 91ad1f21ca61 to 1e148cada9d4 (3 revisions) (flutter/flutter#173890) 2025-08-16 [email protected] Roll Dart SDK from 9277d6303da5 to 67ca79475db6 (1 revision) (flutter/flutter#173886) 2025-08-15 [email protected] Blocks exynos9820 chip from vulkan (flutter/flutter#173807) 2025-08-15 [email protected] Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" (flutter/flutter#173879) 2025-08-15 [email protected] Roll `package:analyzer` forward to `8.1.1` (flutter/flutter#173867) 2025-08-15 [email protected] Roll Skia from 2f66be8a593a to 91ad1f21ca61 (3 revisions) (flutter/flutter#173877) 2025-08-15 [email protected] [a11y] : set isFocused will update isFocusable to true (flutter/flutter#170935) 2025-08-15 [email protected] Reland predictive back route transitions by default (flutter/flutter#173860) 2025-08-15 [email protected] Roll Fuchsia Linux SDK from zWRpLglb48zC1vZLv... to H1kVA85LyQsK8EDp2... (flutter/flutter#173874) 2025-08-15 [email protected] Add onHover callback support for TableRowInkWell (flutter/flutter#173373) 2025-08-15 [email protected] Roll Skia from 5654ac32ede0 to 2f66be8a593a (6 revisions) (flutter/flutter#173866) 2025-08-15 [email protected] Roll Dart SDK from cc008dc8e7aa to 9277d6303da5 (2 revisions) (flutter/flutter#173864) 2025-08-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implements the Android native stretch effect as a fragment shader (Impeller-only). (#169293)" (flutter/flutter#173865) 2025-08-15 [email protected] Re-add `Linux_android_emu *` tests that had KVM issues, now resolved (flutter/flutter#173812) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…72406) # Improve SweepGradient and TileMode Documentation ## Description This PR enhances the documentation for `SweepGradient` and `TileMode` to provide clearer guidance on how angles are measured and how tile modes affect sweep gradient rendering. ### Changes 1. **SweepGradient Documentation**: - Clarified angle measurement in radians from the positive x-axis - Documented angle normalization behavior for values outside [0, 2π] - Added detailed explanations of how each `TileMode` affects rendering outside the angular sector 2. **Gradient.sweep Constructor**: - Improved parameter documentation - Added a practical example showing how to create a 90-degree sweep gradient - Clarified the relationship between color stops and angles 3. **TileMode Documentation**: - Added sweep gradient-specific behavior to each `TileMode` variant - Clarified how each mode (clamp, repeated, mirror, decal) affects rendering outside the angular sector - Improved overall documentation structure for gradient edge behavior ## Related Issues Fixes flutter#166206 ## Testing - Verified documentation changes by reviewing the generated API docs - Ensured all examples compile and render as expected ## Breaking Changes None - this is purely a documentation improvement. ## Additional Notes The changes make it much clearer how `startAngle` and `endAngle` interact with different `TileMode` values, which was a source of confusion in the original issue. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Victor Sanni <[email protected]>
…r#9836) flutter/flutter@52af7a5...0a2906b 2025-08-16 [email protected] Improve `SweepGradient` angle and `TileMode` documentation (flutter/flutter#172406) 2025-08-16 [email protected] Roll Skia from 1e148cada9d4 to 16dbd908dcab (1 revision) (flutter/flutter#173901) 2025-08-16 [email protected] Roll Skia from 91ad1f21ca61 to 1e148cada9d4 (3 revisions) (flutter/flutter#173890) 2025-08-16 [email protected] Roll Dart SDK from 9277d6303da5 to 67ca79475db6 (1 revision) (flutter/flutter#173886) 2025-08-15 [email protected] Blocks exynos9820 chip from vulkan (flutter/flutter#173807) 2025-08-15 [email protected] Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" (flutter/flutter#173879) 2025-08-15 [email protected] Roll `package:analyzer` forward to `8.1.1` (flutter/flutter#173867) 2025-08-15 [email protected] Roll Skia from 2f66be8a593a to 91ad1f21ca61 (3 revisions) (flutter/flutter#173877) 2025-08-15 [email protected] [a11y] : set isFocused will update isFocusable to true (flutter/flutter#170935) 2025-08-15 [email protected] Reland predictive back route transitions by default (flutter/flutter#173860) 2025-08-15 [email protected] Roll Fuchsia Linux SDK from zWRpLglb48zC1vZLv... to H1kVA85LyQsK8EDp2... (flutter/flutter#173874) 2025-08-15 [email protected] Add onHover callback support for TableRowInkWell (flutter/flutter#173373) 2025-08-15 [email protected] Roll Skia from 5654ac32ede0 to 2f66be8a593a (6 revisions) (flutter/flutter#173866) 2025-08-15 [email protected] Roll Dart SDK from cc008dc8e7aa to 9277d6303da5 (2 revisions) (flutter/flutter#173864) 2025-08-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implements the Android native stretch effect as a fragment shader (Impeller-only). (#169293)" (flutter/flutter#173865) 2025-08-15 [email protected] Re-add `Linux_android_emu *` tests that had KVM issues, now resolved (flutter/flutter#173812) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…72406) # Improve SweepGradient and TileMode Documentation ## Description This PR enhances the documentation for `SweepGradient` and `TileMode` to provide clearer guidance on how angles are measured and how tile modes affect sweep gradient rendering. ### Changes 1. **SweepGradient Documentation**: - Clarified angle measurement in radians from the positive x-axis - Documented angle normalization behavior for values outside [0, 2π] - Added detailed explanations of how each `TileMode` affects rendering outside the angular sector 2. **Gradient.sweep Constructor**: - Improved parameter documentation - Added a practical example showing how to create a 90-degree sweep gradient - Clarified the relationship between color stops and angles 3. **TileMode Documentation**: - Added sweep gradient-specific behavior to each `TileMode` variant - Clarified how each mode (clamp, repeated, mirror, decal) affects rendering outside the angular sector - Improved overall documentation structure for gradient edge behavior ## Related Issues Fixes flutter#166206 ## Testing - Verified documentation changes by reviewing the generated API docs - Ensured all examples compile and render as expected ## Breaking Changes None - this is purely a documentation improvement. ## Additional Notes The changes make it much clearer how `startAngle` and `endAngle` interact with different `TileMode` values, which was a source of confusion in the original issue. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Victor Sanni <[email protected]>
…72406) # Improve SweepGradient and TileMode Documentation ## Description This PR enhances the documentation for `SweepGradient` and `TileMode` to provide clearer guidance on how angles are measured and how tile modes affect sweep gradient rendering. ### Changes 1. **SweepGradient Documentation**: - Clarified angle measurement in radians from the positive x-axis - Documented angle normalization behavior for values outside [0, 2π] - Added detailed explanations of how each `TileMode` affects rendering outside the angular sector 2. **Gradient.sweep Constructor**: - Improved parameter documentation - Added a practical example showing how to create a 90-degree sweep gradient - Clarified the relationship between color stops and angles 3. **TileMode Documentation**: - Added sweep gradient-specific behavior to each `TileMode` variant - Clarified how each mode (clamp, repeated, mirror, decal) affects rendering outside the angular sector - Improved overall documentation structure for gradient edge behavior ## Related Issues Fixes flutter#166206 ## Testing - Verified documentation changes by reviewing the generated API docs - Ensured all examples compile and render as expected ## Breaking Changes None - this is purely a documentation improvement. ## Additional Notes The changes make it much clearer how `startAngle` and `endAngle` interact with different `TileMode` values, which was a source of confusion in the original issue. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Victor Sanni <[email protected]>
…72406) # Improve SweepGradient and TileMode Documentation ## Description This PR enhances the documentation for `SweepGradient` and `TileMode` to provide clearer guidance on how angles are measured and how tile modes affect sweep gradient rendering. ### Changes 1. **SweepGradient Documentation**: - Clarified angle measurement in radians from the positive x-axis - Documented angle normalization behavior for values outside [0, 2π] - Added detailed explanations of how each `TileMode` affects rendering outside the angular sector 2. **Gradient.sweep Constructor**: - Improved parameter documentation - Added a practical example showing how to create a 90-degree sweep gradient - Clarified the relationship between color stops and angles 3. **TileMode Documentation**: - Added sweep gradient-specific behavior to each `TileMode` variant - Clarified how each mode (clamp, repeated, mirror, decal) affects rendering outside the angular sector - Improved overall documentation structure for gradient edge behavior ## Related Issues Fixes flutter#166206 ## Testing - Verified documentation changes by reviewing the generated API docs - Ensured all examples compile and render as expected ## Breaking Changes None - this is purely a documentation improvement. ## Additional Notes The changes make it much clearer how `startAngle` and `endAngle` interact with different `TileMode` values, which was a source of confusion in the original issue. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Victor Sanni <[email protected]>
…72406) # Improve SweepGradient and TileMode Documentation ## Description This PR enhances the documentation for `SweepGradient` and `TileMode` to provide clearer guidance on how angles are measured and how tile modes affect sweep gradient rendering. ### Changes 1. **SweepGradient Documentation**: - Clarified angle measurement in radians from the positive x-axis - Documented angle normalization behavior for values outside [0, 2π] - Added detailed explanations of how each `TileMode` affects rendering outside the angular sector 2. **Gradient.sweep Constructor**: - Improved parameter documentation - Added a practical example showing how to create a 90-degree sweep gradient - Clarified the relationship between color stops and angles 3. **TileMode Documentation**: - Added sweep gradient-specific behavior to each `TileMode` variant - Clarified how each mode (clamp, repeated, mirror, decal) affects rendering outside the angular sector - Improved overall documentation structure for gradient edge behavior ## Related Issues Fixes flutter#166206 ## Testing - Verified documentation changes by reviewing the generated API docs - Ensured all examples compile and render as expected ## Breaking Changes None - this is purely a documentation improvement. ## Additional Notes The changes make it much clearer how `startAngle` and `endAngle` interact with different `TileMode` values, which was a source of confusion in the original issue. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Victor Sanni <[email protected]>
…72406) # Improve SweepGradient and TileMode Documentation ## Description This PR enhances the documentation for `SweepGradient` and `TileMode` to provide clearer guidance on how angles are measured and how tile modes affect sweep gradient rendering. ### Changes 1. **SweepGradient Documentation**: - Clarified angle measurement in radians from the positive x-axis - Documented angle normalization behavior for values outside [0, 2π] - Added detailed explanations of how each `TileMode` affects rendering outside the angular sector 2. **Gradient.sweep Constructor**: - Improved parameter documentation - Added a practical example showing how to create a 90-degree sweep gradient - Clarified the relationship between color stops and angles 3. **TileMode Documentation**: - Added sweep gradient-specific behavior to each `TileMode` variant - Clarified how each mode (clamp, repeated, mirror, decal) affects rendering outside the angular sector - Improved overall documentation structure for gradient edge behavior ## Related Issues Fixes flutter#166206 ## Testing - Verified documentation changes by reviewing the generated API docs - Ensured all examples compile and render as expected ## Breaking Changes None - this is purely a documentation improvement. ## Additional Notes The changes make it much clearer how `startAngle` and `endAngle` interact with different `TileMode` values, which was a source of confusion in the original issue. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Victor Sanni <[email protected]>
Improve SweepGradient and TileMode Documentation
Description
This PR enhances the documentation for
SweepGradientandTileModeto provide clearer guidance on how angles are measured and how tile modes affect sweep gradient rendering.Changes
SweepGradient Documentation:
TileModeaffects rendering outside the angular sectorGradient.sweep Constructor:
TileMode Documentation:
TileModevariantRelated Issues
Fixes #166206
Testing
Breaking Changes
None - this is purely a documentation improvement.
Additional Notes
The changes make it much clearer how
startAngleandendAngleinteract with differentTileModevalues, which was a source of confusion in the original issue.Pre-launch Checklist
///).