Repository navigation
Commit 645ccab
authored
[material_ui] Add supportingTextPadding to InputDecorator (flutter#12769)
This PR introduces the `supportingTextPadding` property to `InputDecorator`, `InputDecoration`, and `InputDecorationThemeData`.
While originally conceived as `errorPadding`, this property was renamed to `supportingTextPadding` during review to align with the Material Design 3 specification, as it controls the padding for the entire supporting text row (which includes helper text, error text, and counter widgets).
Additionally, this PR addresses layout, intrinsic sizing, and code consistency concerns raised during the review process:
#### Key Features & Refactors:
1. **Added `supportingTextPadding`:** Allows complete, independent control over the padding of the supporting text row (helper/error/counter).
2. **Decoupled Layout Constraints:** Introduced `supportingTextConstraints` in `_layout()` to bound the supporting text row independently of `contentConstraints`, ensuring custom paddings do not break or shift the layout of inline `prefix`/`suffix` widgets.
3. **Fixed Intrinsic Height Mismatches:** Corrected `computeMinIntrinsicHeight()` to compute `supportingTextWidth` separately from the primary width deflation path, ensuring intrinsic height calculations accurately predict wrapped text heights.
4. **Unified Terminology:** Renamed all legacy internal `subtext` references (e.g. `_SubtextSize`, `_computeSubtextSizes`, `subtextHeight`) to `supportingText` to match the public property name and the M3 spec.
*List which issues are fixed by this PR. You must list at least one issue.*
Port of [flutter#183582](flutter#183582) which Fixes [flutter#175834](flutter#175834)
## 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.1 parent 2eb4c71 commit 645ccab
4 files changed
Lines changed: 493 additions & 47 deletions
File tree
- packages/material_ui
- lib/src
- pending_changelogs
- test
0 commit comments