Home > Net >  How can i Add a Horizontal Text (Sentence) On Flutter?
How can i Add a Horizontal Text (Sentence) On Flutter?

Time:12-12

I want to add an horizontal text(Sentence) which will has the ability to use the entire horizontal space to display the Sentence and even go to the next line of the display (if required) automatically.

Thank you in advance.

CodePudding user response:

Here is the result enter image description here

class Paragraph Screen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    MediaQueryData screen = MediaQuery.of(context);
    return Scaffold(
      body: Container(
        width: screen.size.width,
        child: Text('Your Paragraph',
          textAlign: TextAlign.justify,
        ),
      ),
    );
  }
}
  • Related