代码之家  ›  专栏  ›  技术社区  ›  Harsh Bhikadia

切换应用程序时如何更改应用程序窗口中显示的颜色

  •  0
  • Harsh Bhikadia  · 技术社区  · 6 年前

    我想改变面板颜色(我不知道它叫什么,检查照片),而不改变主题数据中的原色。

    enter image description here

    我使用颤振为这个项目。这可以在颤振本身或我应该做它在android代码。

    1 回复  |  直到 6 年前
        1
  •  0
  •   Ozesh    6 年前

    这个小组通常被称为 导航栏 .

    可以通过指定appBar来更改其颜色 backgroundColor 当你返回屏幕类的脚手架时。

    下面是一个快速示例:

    appBar: AppBar(
      backgroundColor: Colors.green
    )
    

    Here is a link to the Scaffold class

    AppBar class