Home > Enterprise >  How to set maxline for text?
How to set maxline for text?

Time:03-08

flutter ui

I tried to make it fit the screen. Do you have a solution?

CodePudding user response:

you can set the text's overflow variable like this:

  overflow: TextOverflow.ellipsis,

CodePudding user response:

You can resolve this issue using the Expanded Widget. Wrap your overflowing text widget with the Expanded Widget.

Sample code:

const Expanded(
   child: Text('i dont know 55555555555555555555555555555555'),
),
  • Related