浏览代码

update lottie demo

/main
siyao 3 年前
当前提交
a7aaa72d
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 2
      Samples/UIWidgetsSamples_2019_4/Assets/Script/ImageTest.cs
  2. 6
      com.unity.uiwidgets/Runtime/widgets/LottiePainter.cs

2
Samples/UIWidgetsSamples_2019_4/Assets/Script/ImageTest.cs


child: new Column(
children: new List<Widget>
{
AnimatedLottie.file("wine.json", frame: frame, curve: Curves.linear),
new Lottie("wine.json", size: new Size(100, 100)),
new Container(
width: 100,
height: 100,

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


public int _round = 0;
public float _frame = 0;
public float _duration = 0;
public Size _size = null;
public Lottie(string path, float frame = 0, int round = -1) {
public Lottie(string path, float frame = 0, Size size = null, int round = -1) {
_size = size;
}
public override State createState() {

}
return new CustomPaint(
size: Size.infinite,
size: widget._size,
painter: new LottiePainter(
skottie: widget._skottie,
frame: _frame

正在加载...
取消
保存