美文网首页
Animation?如果只有一种颜色的时候

Animation?如果只有一种颜色的时候

作者: 司徒新新 | 来源:发表于2022-09-07 12:20 被阅读0次

Animation<Color?>?如果只有一种颜色的时候,或者不需要控制器的时候,可以使用
AlwaysStoppedAnimation(Colors.red),

举个🌰


image.png
修改刷新的组件的header
 MaterialHeaderWidget(
      key: key,
      displacement: displacement,
      //修改颜色
      valueColor: AlwaysStoppedAnimation(getBaseYellowColor()),
      backgroundColor: backgroundColor,
      linkNotifier: linkNotifier,
    );
  }

相关文章

网友评论

      本文标题:Animation?如果只有一种颜色的时候

      本文链接:https://www.haomeiwen.com/subject/nbconrtx.html