I can't get the title in the center of my appBar
using textAlign: TextAlign center
. What is the difference between them?
Asked
Active
Viewed 61 times
1

Andronicus
- 25,419
- 17
- 47
- 88

Thashreef Mohammed
- 163
- 2
- 6
-
See https://stackoverflow.com/questions/51638176/under-which-circumstances-textalign-property-works-in-flutter/51639681#51639681 – Rémi Rousselet Dec 30 '19 at 13:57
-
1Where is your minimal reproducible example https://stackoverflow.com/help/minimal-reproducible-example – Zydnar Dec 30 '19 at 16:27
1 Answers
1
centerTitle
is a property of AppBar
, and it is used to center the title, which you generally see in iOS design pattern.
On the other hand, TextAlign.center
is Text
's align
value. This only works if your Text
is long enough (means there are some more spaces for text), see my this answer for more information.

CopsOnRoad
- 237,138
- 77
- 654
- 440