浏览代码

Merge pull request #212 from Unity-Technologies/siyaoH/1.17/lottie

fix setstate after dispose
/main
GitHub 3 年前
当前提交
c50916ed
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
      com.unity.uiwidgets/Runtime/widgets/LottiePainter.cs

3
com.unity.uiwidgets/Runtime/widgets/LottiePainter.cs


public override Widget build(BuildContext context) {
if (_round != 0) {
WidgetsBinding.instance.addPostFrameCallback((_) => {
if (!mounted) {
return;
}
setState(() => {
_frame += Time.deltaTime;
if (_frame > widget._duration) {

正在加载...
取消
保存