Repository navigation
Update snack_bar.dart - #181959
Update snack_bar.dart#181959matasb-google wants to merge 1 commit into
Conversation
Ensure textScalling is taken into account for Sizing overflow. Remove x 0.4 spacing on right when multiple lines used, not in spec for M3
|
Hey @matasb-google! Is this a change you would like to move forward with? It will need a test. Please move it out of draft and mark it ready for review when it is. Thanks! |
This is actual fix for bug in snackbar, but it will affect tests which use goldens. Due to this I did not have time to roll this out (or write tests). |
|
Is there an open issue we can refer to? |
|
I've marked this PR as not ready to port to flutter/packages yet. |
|
This PR is now ready to port over to flutter/packages! See instructions and guidance in #188444 Thank you! |
|
Ported over to flutter/packages: flutter/packages#12737 |
…tion overflow (#12737) Port of flutter/flutter#181959 to `flutter/packages` as part of the Material decoupling effort (flutter/flutter#188444). Ensure textScalling is taken into account for Sizing overflow. Fixes flutter/flutter#192232 Fixes flutter/flutter#181959 Part of flutter/flutter#188444 ### Description - Ensure textScalling is taken into account for Sizing overflow: passes `MediaQuery.textScalerOf(context)` to `actionTextPainter` so that `actionAndIconWidth` properly scales with accessibility text scaling. - Removes `SizedBox(width: snackBarWidth * 0.4)` when the action overflows, eliminating unintended blank space on the right of multi-line content. - Adds unit tests in `snack_bar_test.dart` verifying `textScaler` overflow calculation and layout. - Adds pending changelog entry. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Ensure textScalling is taken into account for Sizing overflow.
Remove x 0.4 spacing on right when multiple lines used, not in spec for M3
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.