Flutter TextField align

2,125

It is the helperText property what you are looking for.

Share:
2,125
mynameis
Author by

mynameis

Updated on December 01, 2022

Comments

  • mynameis
    mynameis over 1 year

    I need to create a TextFormField with decorations - counterText and labelText. I do in this way:

    new TextFormField(
      decoration: new InputDecoration(
          counterText: "some text",
          labelText: header),
    );
    

    Everything is ok except the fact that I need to move counter text to the left but by the default, it is on the right side. How to change it? I know that there is counterStyle parameter but I have no idea how to use it to achieve moving text to the left.

  • mynameis
    mynameis over 6 years
    Aww you're right! Thank you so much! I have additional question, do you know how to show this helper text only when text field has focus?
  • Shady Aziza
    Shady Aziza over 6 years
    Yes sure I can try that! I guess it is better if you open another question because this is a whole different subject.