0

I am trying to achieve something similar to this in flutter.

Take the following text for example;

Some long text that should be displayed in

two lines.

I want it to be displayed like this;

Some long text that should

be displayed in two lines.

I can't simply do this by putting a 'new line character' \n to the string manually because it will be a dynamic string.

rasitayaz
  • 400
  • 2
  • 16

1 Answers1

0

You can use RichText, or try to add "\n" operator. So it should look like "Some long text that should\nbe displayed in two lines."

  • Well, I forgot to mention that the string will be dynamic. So I can't manually insert \n character to it. – rasitayaz Jun 13 '21 at 16:42