簡體   English   中英

顫動延遲動畫顯示沒有動畫曲線

[英]Flutter delayed animation shows no animation curve

我目前有動畫延遲的問題。 我使用FadeTransition小部件淡入頁面內容並淡出一些文本,這些文本在開頭顯示。 它有效,但動畫非常突然。

編輯:沒關系。 Interval值> 1.0。 下面的代碼工作正常。

class _SinglePhotoState extends State<SinglePhoto> with TickerProviderStateMixin{

  AnimationController controller, controllerText;
  Animation<double> delayedAnimation, delayedText;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    controller = AnimationController(duration: const Duration(seconds: 5), vsync: this);
    controllerText = AnimationController(duration: const Duration(seconds: 3), vsync: this);
    delayedText = Tween(begin: 1.0, end: 0.0).animate(
       CurvedAnimation(
          parent: controllerText,
          curve: Interval(0.25, 0.5, curve: Curves.easeIn)
       ));
    delayedAnimation = Tween(begin: 0.0, end: 1.0).animate(
       CurvedAnimation(
          parent: controller,
          curve: Interval(0.5, 1.0, curve: Curves.easeIn)
       ));

        controllerText.forward();
        controller.forward();
    }

在Profile或Release版本中,動畫也非常突然嗎?

我注意到我的動畫在調試模式下也非常不一致且不穩定。 但在Profile版本中,一切都很好。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM