flutter 動畫的幾種寫法

static final Tween<Offset> _bottomUpTween = Tween<Offset>(
    begin: const Offset(0.0, 0.25),
    end: Offset.zero,
  );
static final Animatable<double> _fastOutSlowInTween = CurveTween(curve: Curves.fastOutSlowIn);

routeAnimation.drive(_bottomUpTween.chain(_fastOutSlowInTween))

vs

Tween(begin: 0.0, end: 1.0).animate(
                    CurvedAnimation(parent: _controller, curve: AxeCurve()))
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章