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
51 stars 34 forks source link

Simple workaround to add the space on the each line in the dynamic width mode, so the last character won't be dropped on the next line #9

Closed FallenAngel97 closed 3 years ago

FallenAngel97 commented 3 years ago

I have experienced the same issue mentioned here: https://github.com/lzhuor/auto_size_text_field/issues/2 This is pretty simple approach, but this works out (check the gif) ezgif-2-2679a4844451

Closes #2

lzhuor commented 3 years ago

Thank you very much @FallenAngel97 It does work.

Merged.

Would you mind giving a star of the repo or giving a like to support this project?

FallenAngel97 commented 3 years ago

Yeah, sure. Actually, can you move a line 767 _textSpanWidth = math.max(tp.width, widget.minWidth ?? 0);

just before the if block? That way it won't be overwitten by original textpainter.

lzhuor commented 3 years ago

@FallenAngel97 Thanks, I will take a look later today.