颤动 – 如何更改appBar后退按钮颜色

前端之家收集整理的这篇文章主要介绍了颤动 – 如何更改appBar后退按钮颜色前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我无法弄清楚如何将appBar的自动后退按钮更改为其他颜色.它在脚手架下,我试图研究它,但我无法绕过它.

return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.white,title: Image.asset(
          'images/.jpg',fit: BoxFit.fill,),centerTitle: true,

解决方法

您必须使用AppBar中的iconTheme属性,如下所示:

appBar: AppBar(
          iconTheme: IconThemeData(
            color: Colors.black,//change your color here
          ),title: Text("Sample"),body: Text("Sample body"),);

猜你在找的Flutter相关文章