Flutter 如何使用主题[flatter]将AppBar标题居中
我想用Flutter 如何使用主题[flatter]将AppBar标题居中,flutter,dart,flutter-layout,Flutter,Dart,Flutter Layout,我想用主题将我应用程序中的所有标题设置为中心,有办法吗?使用中心标题:true appBar: AppBar( centerTitle: true, title: Text("Appbar Title"), ), 使用主题将应用程序栏居中 theme: ThemeData( appBarTheme: AppBarTheme(centerTitle: true),), 或者也可以使用copywithtooth。我可
主题将我应用程序中的所有标题设置为中心,有办法吗?使用中心标题:true
appBar: AppBar(
centerTitle: true,
title: Text("Appbar Title"),
),
使用主题将应用程序栏居中
theme: ThemeData(
appBarTheme: AppBarTheme(centerTitle: true),),
或者也可以使用copywith
tooth。我可以在AppBarTheme
中修改的属性只有this.brighty、this.color、this.elevation、this.iconTheme、this.actionsIconTheme、this.textTheme、
。没有这个。centerTitle
我不是刚刚发送的。我试过DartPad和它的作品。我刚刚看到了这个。centerTitle。问题是如何处理主题