Reputation: 1037
When I used the suffixIcon so space between hint text and underline is little bit show extra and without suffixIcon it's look perfect. if you see in below image I have used the suffixIcon in "New Password" and "Confirm Password" So there is little bit extra space between hint text and underline but in "Old Password" i have not use the suffixIcon So it's look perfect. I have also try with set suffixIcon size but it's not working, So please help me for how can I remove the extra space when using the suffixIcon?
You can see below with both code and UI.
Upvotes: 0
Views: 377
Reputation: 676
Use contentPadding property of TextFormField to maintain equal amount of space regardless of if whether it has suffixIcon or not:
contentPadding:
const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
Upvotes: 1