Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle long text in InputDecoration->labelText in Flutter

Tags:

I have a TextFormField in Flutter setup, like this:

new TextFormField (
    decoration: new InputDecoration(
    labelText: questionString,
    labelStyle: new TextStyle(
      fontSize: 18.0,
      color: new Color(0xFF18776A),
    )
),

This generates the following screenshot:

TextFormField with labelText

The text is cutting at the end automatically because is too long. Is there a way to adjust the font size to fit the screen or make labelText expand to two lines?


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!