Closed LEMUSADR000 closed 1 year ago
Same issue...
Same here...
@lzhuor Any chance you could look into this? I have a Row --> Expanded --> AutoSizeTextField like OP, but it doesn't resize.
Hi @DowsingUK, please bear in mind that the parent has to be a constrained Box element in Flutter otherwise this widget does not work.
Hi @manylittlestorms, Row
-> Expanded
-> AutoSizeTextField
should work. Did you try to inspect the element and see if size constraints are in the properties of the Widget
element?
Further more: Could you please try the following?
Good day, it's working very well in other devices, lately I tried with an AndroidTV in a huge screen and it worked like a charm, but in some tablets and some iPhones Plus it is not working at all I even have tried compiling project's example as it is and no one single font got resized on those devices
Hi @DowsingUK I might roughly find the root cause. Will share more details later. Thanks to my teammate!
Great we all be waiting, thank you so much!
Hi @DowsingUK I might roughly find the root cause. Will share more details later. Thanks to my teammate!
Thank you. Waiting for a fix.
Hello,
I m not sure it's related to that issue but for me the example (https://github.com/lzhuor/auto_size_text_field/blob/master/example/lib/main.dart) doesn't work except the last one, "multi line text with input padding".
I don't need the multi lines usage in my case but for those who are interested I make it working with one line input by removing maxWidth: constraintWidth
from tp.layout
line 790. But it breaks the multi lines. Maybe I'll try to open a PR to solve that issue as well but I m new to Dart and Flutter and not a lot of free time to do.
Also, about the first example given by the author of the issue, I notice that the controller shouldn't be initialize when passed to the constructor AutoSizeTextField
but be declared before in a variable and pass it to the constructor.
I m using a Galaxy S10 with Android 11.
Otherwise thanks for that package 😄
Hi @Raph22 Thank you very much for the explanation. I am sorry that my day job has been making me occupied due to year-end stuff. Looking forward to your PR and thank you for the kind words!
Hi @DowsingUK @manylittlestorms @Raph22 @LEMUSADR000 , I found that for some Android 11 and above devices, we have to explicitly set the constraints
to get it to work. The temporary workaround is:
Container(
constraints: BoxConstraints(maxWidth: 280),
child: AutoSizeTextField()
)
Closed as no more follow-ups with the provided solution.
Where does the value 280
comes from ? You have to know the value of the width beforhand ? It is the anti-usage of Expanded
in a Row
in my understanding.
Hi @DowsingUK @manylittlestorms @Raph22 @LEMUSADR000 , I found that for some Android 11 and above devices, we have to explicitly set the
constraints
to get it to work. The temporary workaround is:Container( constraints: BoxConstraints(maxWidth: 280), child: AutoSizeTextField() )
Having to set a constraint is a problem, since we wanted to use Expanded because we don't know how much width it will get...
@lzhuor Do you think this issue should be re-opened ? The provided solution is actually not a solution but a fake workaround as explained by @manylittlestorms
@lzhuor Do you think this issue should be re-opened ? The provided solution is actually not a solution but a fake workaround as explained by @manylittlestorms
It should be re-opened in my opinion. @lzhuor
Same issue here.
Hi buddies, how this widget works is that it detects the box constraints to compute the optimal textual size.
It's impossible to know the optimal textual size without box constraints. As you mentioned, with <Expanded />
this widget expects to know the boundary constraint but does not.
This is likely a separate issue in Flutter instead of this library. Would love to discuss this with you.
If you can create an example app with this issue, we might be able to help.,
I have the widget code as such:
When I enter input it scrolls to the right but does not limit the size of the input in any way. Why is this?
I've also tried
And get the same results but in a smaller box. Are there some theme data that I need to provide? What is going on. Currently this works 0% of the time.