How to Break Text Line From Middle in Flutter using \n Example

Backward slash also known as backslash with small n character is used to divide a line from between in Flutter. Sometimes we have so much text in flutter mobile application and all the text seems to pushing each other. But using the \n(Backward slash with Small n) character we can Break Text Line From Middle in Flutter Android iOS mobile app.

Contents in this project Break Text Line From Middle in Flutter Android iOS Example:

1. Import material.dart package in your app’s main.dart file.

2. Call our main MyApp class using void main runApp() method.

3. Create our main class named as MyApp extends with State less widget.

4. Creating Text widget with some random text message in Center Widget. As you can see in below text string we are using \n(Backslash n) using to breaking line from middle.

5. Complete source code for main.dart file:

Screenshot:

How to Break Text Line From Middle in Flutter using \n

One Comment

  1. very helpful trick, helped me a lot

Leave a Reply

Your email address will not be published.