How to change text color of AppBar, icon color of FAB universally using theme?

后端 未结 9 1577
渐次进展
渐次进展 2020-12-14 13:50

I am able to set the background color of AppBar to Colors.amber. This automatically sets the text color to Black. I am aware of the accessibility i

9条回答
  •  死守一世寂寞
    2020-12-14 14:27

    I used a slightly different technique, I didn't use a theme, I just customized its appearance, so that when I created it looked like this:

    appBar: new AppBar(
      iconTheme: IconThemeData(
        color: Colors.white
      ),
      title: const Text('Saved Suggestions', style: TextStyle(
        color: Colors.white
      )),
      backgroundColor: Colors.pink,
    ),
    

提交回复
热议问题