且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用主题通用更改AppBar的文本颜色,FAB的图标颜色?

更新时间:2023-01-26 22:02:51

我认为最简单的方法是为正在使用的主题调整标题颜色:

I think the most straightforward way of doing this is to adjust the title color for the theme that you are working with:

theme: new ThemeData(
  primarySwatch: Colors.grey,
  primaryTextTheme: TextTheme(
    headline6: TextStyle(
      color: Colors.white
    )
  )
)