我在更改颤动应用栏上的文本和图标小部件的颜色时遇到问题。
我已经在材料应用程序中尝试过主题,但它不起作用。
这是有效的:title: Text('Profile', style: TextStyle(color: Colors.black)),
但我想将其应用于所有应用程序栏。那么我应该在哪里更改材质主题呢?
MaterialApp(
title: "My App",
theme: ThemeData(
appBarTheme: AppBarTheme(
backgroundColor: Color(0xffFCD581),
brightness: Brightness.dark,
),
Run Code Online (Sandbox Code Playgroud)
text: profile我怎样才能改变和的颜色icon。全球。
将颜色设置为headline6有效Colors.black。但它也使标题文本变小。我可以设置字体大小headline6,它会普遍反映。但我认为我们通过 appbar 获得的标题的默认大小已经足够合适了。那么有没有什么解决方案,只会改变 的color而不appbar text, title影响fontsize.