simc / auto_size_text

Flutter widget that automatically resizes text to fit perfectly within its bounds.
https://pub.dev/packages/auto_size_text
MIT License
2.02k stars 235 forks source link

AutoSize TextField #38

Open raphFlash opened 4 years ago

raphFlash commented 4 years ago

Hello, Thanks for your AutoSizeText, it works really well. Is it possible to have the same auto sizing feature for a TextField. The Textfield would adjust the fontsize based on the input. It would be really nice.

simc commented 4 years ago

Currently that is not possible. Text and TextField are two different widgets so we would need a AutoSizeTextField. I'll leave this issue open and when other users need have the same request, I'll see what I can do 👍

Ahmadre commented 4 years ago

Same here! Needed it always in every project ^^

simc commented 4 years ago

I'm really unsure about this. Afaik neither iOS nor Android have an equivalent native EditText with auto sizing text. And I have never used an app where text resizes while I enter it...

Ahmadre commented 4 years ago

Alright and what about a textfield like facebook, where you type text for a post? Facebook is shrinking the text size while typing. That's exactly what i need. I mean it's like the tutorial gifs you provide in your readme. I did a workaround for that posting issue, but autosizetext would help here a lot :)

stargazing-dino commented 4 years ago

I needed something like this too. I have an interface where all of the on the screen text is editable to certain roles and instead of switching them between Text and TextField, I instead only display TextFields with their readOnly properties toggled.

Currently, I feel like switching from AutoSizeText to a TextField would also give the person editing a different impression since their text would size differently once they'd submitted.

simc commented 4 years ago

Okay, you convinced me ^^

I don't know when I will have time to implement this.

hicnar commented 4 years ago

Agreed! Would be great to have it for TextField and TextFormField!

DomingoMG commented 4 years ago

Does anyone know if it is possible to adjust the text in the text field?

Ahmadre commented 4 years ago

@leisim any updates?

lzhuor commented 4 years ago

Hi @Nolence @Ahmadre @raphFlash @leisim , I want it too so I created one.

🎉 You might want to try this: https://github.com/lzhuor/auto_size_text_field

It's a work based off @leisim 's logic in auto_size_text. Hope we can improve auto_size_text_field together. ❤️

Ahmadre commented 4 years ago

@lzhuor thank you sooooo much ❤️