Commit a5934ee
authored
fix(scrollbar): Update padding type to EdgeInsetsGeometry (flutter#172056)
<!--
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 PR enhances RTL support for the RawScrollbar widget by updating its
padding type and adding comprehensive tests.
The changes include:
1. Updating RawScrollbar's `padding` parameter from `EdgeInsets` to
`EdgeInsetsGeometry`
- This change is non-breaking because `EdgeInsets` is a subclass of
`EdgeInsetsGeometry`
- Existing code using `EdgeInsets` will continue to work as before
- Users can now optionally use `EdgeInsetsDirectional` for RTL support
2. Adding a test case that verifies scrollbar positioning with
EdgeInsetsDirectional padding
3. Testing both overscroll and regular scroll scenarios with directional
padding
These changes ensure that the scrollbar works correctly in both LTR and
RTL layouts, improving accessibility and internationalization support.
Fixes: flutter#167922
## Pre-launch Checklist
- [x] I read the [Contributor
Guide](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
and followed the process outlined there for submitting PRs.
- [x] I read the [Tree
Hygiene](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md)
wiki page, which explains my responsibilities.
- [x] I read and followed the [Flutter Style
Guide](https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md),
including [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).
- [x] I signed the [CLA](https://cla.developers.google.com/).
- [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.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on
[Discord](https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md).
<!-- 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.md1 parent 5f9b9ab commit a5934ee
2 files changed
Lines changed: 98 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | | - | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
113 | 120 | | |
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
117 | 124 | | |
118 | 125 | | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
190 | 198 | | |
191 | 199 | | |
192 | 200 | | |
| 201 | + | |
193 | 202 | | |
194 | 203 | | |
195 | 204 | | |
| |||
290 | 299 | | |
291 | 300 | | |
292 | 301 | | |
293 | | - | |
294 | | - | |
295 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
296 | 310 | | |
297 | 311 | | |
298 | 312 | | |
299 | 313 | | |
300 | 314 | | |
| 315 | + | |
301 | 316 | | |
302 | 317 | | |
303 | 318 | | |
| |||
388 | 403 | | |
389 | 404 | | |
390 | 405 | | |
| 406 | + | |
391 | 407 | | |
392 | 408 | | |
393 | 409 | | |
394 | 410 | | |
395 | 411 | | |
396 | 412 | | |
397 | | - | |
| 413 | + | |
| 414 | + | |
398 | 415 | | |
399 | 416 | | |
400 | | - | |
401 | | - | |
| 417 | + | |
| 418 | + | |
402 | 419 | | |
403 | 420 | | |
404 | 421 | | |
| |||
557 | 574 | | |
558 | 575 | | |
559 | 576 | | |
560 | | - | |
561 | 577 | | |
562 | 578 | | |
563 | 579 | | |
| |||
566 | 582 | | |
567 | 583 | | |
568 | 584 | | |
569 | | - | |
| 585 | + | |
570 | 586 | | |
571 | 587 | | |
572 | 588 | | |
573 | 589 | | |
574 | 590 | | |
575 | 591 | | |
576 | 592 | | |
577 | | - | |
| 593 | + | |
578 | 594 | | |
579 | 595 | | |
580 | 596 | | |
| |||
583 | 599 | | |
584 | 600 | | |
585 | 601 | | |
586 | | - | |
| 602 | + | |
587 | 603 | | |
588 | 604 | | |
589 | 605 | | |
590 | 606 | | |
591 | 607 | | |
592 | 608 | | |
593 | 609 | | |
594 | | - | |
| 610 | + | |
595 | 611 | | |
596 | 612 | | |
597 | 613 | | |
| |||
634 | 650 | | |
635 | 651 | | |
636 | 652 | | |
| 653 | + | |
637 | 654 | | |
638 | 655 | | |
639 | 656 | | |
| |||
1320 | 1337 | | |
1321 | 1338 | | |
1322 | 1339 | | |
1323 | | - | |
| 1340 | + | |
1324 | 1341 | | |
1325 | 1342 | | |
1326 | 1343 | | |
| |||
1543 | 1560 | | |
1544 | 1561 | | |
1545 | 1562 | | |
| 1563 | + | |
1546 | 1564 | | |
1547 | 1565 | | |
1548 | 1566 | | |
| |||
1552 | 1570 | | |
1553 | 1571 | | |
1554 | 1572 | | |
1555 | | - | |
| 1573 | + | |
1556 | 1574 | | |
1557 | 1575 | | |
1558 | | - | |
| 1576 | + | |
1559 | 1577 | | |
1560 | 1578 | | |
1561 | 1579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
3567 | 3567 | | |
3568 | 3568 | | |
3569 | 3569 | | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
3570 | 3634 | | |
0 commit comments