如何解决AppBar 中的 Flutter 居中文本
我只想将整个文本居中(当然它应该仍在 AppBar 中)。谢谢
4
4
f
解决方法
在 y
小部件中包含 mainAxisAlignment
到 MainAxisAlignment.center
示例代码:
Row
,
使用 centerTitle : true
appBar: AppBar(
centerTitle: true,toolbarHeight: 80.0,backgroundColor: Colors.amber,title: Row(children: [
Text("Text",style: GoogleFonts.josefinSans(
textStyle: const TextStyle(fontSize: 40.0))),Text(
"The Game",style: GoogleFonts.overpass(
textStyle: const TextStyle(fontSize: 20.0)),)
])),
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。