【问题标题】:how can i cause an animation to run also when the screen is off?当屏幕关闭时,如何使动画也运行?
【发布时间】:2021-02-07 05:22:58
【问题描述】:

我的应用程序中有一个秒表。此秒表由 CirclePercentIndicator 包构建,并且 precent 属性由动画控制,此组合创建秒表。

问题是动画开始运行后需要一段时间,屏幕会关闭,但动画也会停止,并且应该继续运行的时钟停止。

我该如何解决?

【问题讨论】:

    标签: flutter animation stopwatch


    【解决方案1】:

    当我编写代码时,我将控制器置于 dispose 函数中。当我省略它时,问题就解决了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-30
      • 1970-01-01
      • 1970-01-01
      • 2010-12-10
      • 2017-06-14
      相关资源
      最近更新 更多