Repository navigation
Commit 2a9ec69
authored
[material_ui] Fix minimum width for Material 3 primary tab indicator (#13322)
This change gives the default Material 3 primary `TabBar` indicator a minimum width of 24dp, centered on the selected label, as specified by the [Material 3 tabs spec](https://m3.material.io/components/tabs/specs). It adds a regression test for a short tab label. Custom indicators and secondary tabs retain their existing sizing behavior.
part of flutter/flutter#194716
## Testing
- `dart run script/tool/bin/flutter_plugin_tools.dart test --packages=material_ui` — passed for all four targets: `material_ui`, its example, the accessibility assessments app, and `gen_defaults`.
- `flutter test test/tabs_test.dart` — passed (204 tests), including the 24dp regression test.
- `flutter analyze lib/src/tabs.dart test/tabs_test.dart` — no issues found.
- `dart format lib/src/tabs.dart test/tabs_test.dart` — completed; no formatting changes were needed.
## Pre-Review Checklist1 parent 62099ac commit 2a9ec69
3 files changed
Lines changed: 59 additions & 0 deletions
File tree
- packages/material_ui
- lib/src
- pending_changelogs
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
492 | 493 | | |
493 | 494 | | |
494 | 495 | | |
| 496 | + | |
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
| |||
513 | 515 | | |
514 | 516 | | |
515 | 517 | | |
| 518 | + | |
516 | 519 | | |
517 | 520 | | |
518 | 521 | | |
| |||
531 | 534 | | |
532 | 535 | | |
533 | 536 | | |
| 537 | + | |
534 | 538 | | |
535 | 539 | | |
536 | 540 | | |
| |||
553 | 557 | | |
554 | 558 | | |
555 | 559 | | |
| 560 | + | |
556 | 561 | | |
557 | 562 | | |
558 | 563 | | |
| |||
622 | 627 | | |
623 | 628 | | |
624 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
625 | 638 | | |
626 | 639 | | |
627 | 640 | | |
| |||
772 | 785 | | |
773 | 786 | | |
774 | 787 | | |
| 788 | + | |
775 | 789 | | |
776 | 790 | | |
777 | 791 | | |
| |||
1771 | 1785 | | |
1772 | 1786 | | |
1773 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
1774 | 1794 | | |
1775 | 1795 | | |
1776 | 1796 | | |
| |||
1785 | 1805 | | |
1786 | 1806 | | |
1787 | 1807 | | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
1788 | 1811 | | |
1789 | 1812 | | |
1790 | 1813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
514 | 547 | | |
515 | 548 | | |
516 | 549 | | |
| |||
0 commit comments