I have this TextField
:
As you see this is the hint of my TextField
, aligned at right.
The problem is that when I type something inside the TextField
, I want that value to be written from the left, but actually, it’s written on the right also:
I want the hint to stay aligned, but when I type something, it goes to another side of TextField
.
The code I’m trying:
TextField(
textAlign: TextAlign.left,
);
Thank you!
2
Answers
Try the following code:
Create this variable to keep text aligned:
In the
onChange
method add:Finally, add this to your text field: