I've been using Flutter for a couple of days and I implemented get API but my concern is when I scroll down the AppBar color changes to another color.How my AppBar looks like when I scroll

在我的AppBar中,我只有标题和动作.

我希望AppBar不会改变其 colored颜色 . 提前感谢您的指导.

推荐答案

您可以在此appBar属性中添加appBar colored颜色 .

AppBar(
   // add your appBar color.
  surfaceTintColor: Colors.white, 
  backgroundColor: Colors.white,
  foregroundColor: foregroundColor,
  shadowColor: shadowColor,
 ),

Flutter相关问答推荐

创建后检索FiRestore文档ID

audioQuery不会等待判断存储权限

Flutter 块消费者仅对特定的状态属性更改做出react

SingleChildScrollView在ErrorWidget.builder中不工作

导航回上一页会将我带回Ffltter应用程序中的登录页面

为Android生成时出现Flutter 错误:给定资源值的<;COLOR&>无效

Flutter为什么不;没有ListView.iterable()构造函数?

将自定义容器附加到屏幕底部

即使小部件比Flutter 中的屏幕更宽,也始终显示滚动条

有没有办法在 google_map 上移动标记(向左或向右移动一些像素)?

Flutter 包错误:此应用程序使用的是已弃用的 Android 嵌入版本

如何从 Flutter 中的 App2 远程点击 App1 中的按钮

如何从底部导航栏打开 bottomModal 表?

如何在 flutter 中使用带有有效负载数据的重定向来执行 firebase 推送通知.?

在提供程序包更改通知程序中构建倒计时时钟

访问 AsyncSnapshot 中的嵌套属性

如何在 flutter 的 onChanged(更改字符)处更改 TextField 边框 colored颜色 ?

如何使用 Row 和 Column 制作 L 形布局?

如何将图像网络装箱到具有边界半径的容器中

Flutter 小部件中的视图和逻辑分离