Animation?如果只有一种颜色的时候
2022-09-07 本文已影响0人
司徒新新
Animation<Color?>?如果只有一种颜色的时候,或者不需要控制器的时候,可以使用
AlwaysStoppedAnimation(Colors.red),
举个🌰
![](https://img.haomeiwen.com/i2068817/525e5af2fbf1931d.png)
修改刷新的组件的header
MaterialHeaderWidget(
key: key,
displacement: displacement,
//修改颜色
valueColor: AlwaysStoppedAnimation(getBaseYellowColor()),
backgroundColor: backgroundColor,
linkNotifier: linkNotifier,
);
}