我想为expandedHeight
的{{1}}设置动画。我不能为此使用SliverAppBar
,所以我认为我可以自己编写此函数。
我有一个cubic和一个duration。现在,我想我只需要一种异步方法即可根据计算出的贝塞尔曲线来更改SliverAppBar的AnimatedContainer
。
expandedHeight
当我更改animateExpandedHeight(int height) async {
Cubic c = Curves.fastOutSlowIn;
Duration d = Duration(milliseconds:800);
while ()
setState(() {
eHeight += x;
});
}
时,我的SliverAppBar的flexibleSpace会扩展到该高度。
有人知道如何在给定立方和持续时间的循环中计算我的身高值吗?
非常感谢!