close

[Solved] textAlign not working flutter

Hello Guys How are you all? Hope You all are fine. I am trying to align my Text in my app but textAlign not working in flutter. So today Here I come with all possible solutions for this error.

We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

How Error Occurs ?

I am trying to align my Text in my app but textAlign not working in flutter. Here is My code

Here Is my Output.

textalign property not working in flutter

How to Solve Error?

Question: textAlign not working flutter.
Answer: This error occurs because your Text property does not contain full-width that’s why your TextAlign not working. To solve textAlign not working flutter just use Align Widget.

Solution 1: Use Align Widget

This error occurs because your Text property does not contain full-width that’s why your TextAlign not working. To solve textAlign not working flutter just use Align Widget.

Here is Example.

Here is Output

textAlign not working

Solution 2: use SizedBox with an infinite width.

Just use Wrap your Text widget to SizedBox and give all of width.

Example

Output

textAlign not working flutter

Summery

So, It’s All About this error. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below on which solution worked for you. Thank You.

Also Check Out Below Tutorials

Leave a Comment

%d bloggers like this: