lzhuor / auto_size_text_field

Flutter TextField widget that automatically resizes text field to fit perfectly within its bounds.
https://pub.dev/packages/auto_size_text_field
MIT License
52 stars 35 forks source link

fixed wrapping for scaled text by small font accessibilty #37

Closed Brazol closed 1 year ago

Brazol commented 1 year ago

When the phone has set accessibility for font size as smaller than normal the wrapping was acting strange. I think the Container width was unnecessarily scaled by text factor since the calculated _textSpanWiidth already accounts for it. And it fixes the issue.

BEFORE: https://user-images.githubusercontent.com/5622717/215096079-6e21e310-d789-484b-b655-871c9c02e82c.mov

AFTER https://user-images.githubusercontent.com/5622717/215096124-b6eb4de5-0050-4746-8d8a-6db543cef6a5.mov

lzhuor commented 1 year ago

Thank you so much for the PR @Brazol . May I confirm that the font size is desired with the scale factor post this change (as in it still factors in the scale factor)?

I can verify it if you don't have band width but it might take some time too.