在Stack Flutter中无法播放耀斑动画

时间:2020-05-26 14:22:53

标签: android flutter animation dart flare

我当时正在考虑将Stack用于动画上NetworkImage堆栈的子级。 原因:从互联网上获取时,它可以用作“加载”动画。但是没有用,动画没有出现,但是当动画在NetworkImage的顶部时可以使用。

有什么办法克服它吗?

Stack(
            children: <Widget>[
              Center(
                child: Container(
                height: 250.0,
                width: 250.0,
                decoration: BoxDecoration(
                color: Colours.background,
                image: 
                DecorationImage(
                image: NetworkImage(
                  "http:XXXXX"
                ),
                fit: BoxFit.cover,               
                    )
                  )
                ),
              ),

              Center(
                child: Container(
                  height: 150.0,
                  width: 150.0,
                  child: FlareActor("assets/Loading.flr",
                  animation: "loading",
                  fit: BoxFit.contain,
                  alignment: Alignment.center,
                  controller: controls
            ),
                ),
              ),

            ],
          ),

0 个答案:

没有答案