mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
## Description This PR fixes the label padding for an InputDecorator with prefixIcon and/or suffixIcon. # Before The label was shorter than the available space because `InputDecoration.contentPadding.horizontal` was applied even when `prefixIcon` and `suffixIcon` were defined. The icons width replaces the corresponding `contentPadding`, so both should not be used at the same time to compute the available space. <img width="269" height="61" alt="image" src="https://github.com/user-attachments/assets/e1433ffb-8f17-46fe-9a65-6b9a504ef043" /> # After The label takes all the available space. <img width="269" height="61" alt="image" src="https://github.com/user-attachments/assets/12e8d087-c75b-48c9-8df4-1b11207c0e73" /> ## Related Issue Fixes [Label padding is wrong for InputDecorator with prefixIcon and/or suffixIcon ](https://github.com/flutter/flutter/issues/173341) ## Tests Adds 1 test.