预期输出:

我当前的输出:

当前输出的代码:
subtitle: Center(child: Text(
"Hello, my name is Sam \n I am new here.",
style: TextStyle(fontSize: 18, color: Colors.white),
),
),发布于 2019-05-21 11:33:38
可以使用属性textAlign设置Text对齐方式
Text(
"Hello, my name is Sam \n I am new here.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, color: Colors.white),
);发布于 2019-05-21 11:38:15
使用textAlign。
subtitle: Center(child: Text(
"Hello, my name is Sam \n I am new here.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, color: Colors.white),
),
),https://stackoverflow.com/questions/56230654
复制相似问题