Zuckjet 28b09850d0
fix: adjust scrollable size assertion with tolerance (#171426)
<!--
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
-->

Fixes: https://github.com/flutter/flutter/issues/136331

The original issue highlights two separate bugs:
1. When Flutter calculates Widgets, there might be floating-point
precision issues. For example, the calculation result may show
_dragTargetRelatedToScrollOrigin.size.height as 64.00000000000003.
Therefore, I introduced a very small tolerance to address this.
2. When there's a size scaling effect on the ReorderableListView, such
as an influence from Transform.scale, the method for calculating the
drag target becomes incorrect.

## 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.
- [ ] 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.
2025-07-31 16:06:07 +00:00
..