Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 如何使用主题[flatter]将AppBar标题居中_Flutter_Dart_Flutter Layout - Fatal编程技术网

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。问题是如何处理
主题