Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

加载目录下文件无反应 #67

Open
Avalanching-QY opened this issue Sep 10, 2021 · 1 comment
Open

加载目录下文件无反应 #67

Avalanching-QY opened this issue Sep 10, 2021 · 1 comment

Comments

@Avalanching-QY
Copy link

void initState() {
this.animationController = SVGAAnimationController(vsync: this);
this._loadAnimation();
super.initState();
}

Widget build(BuildContext context) {
return Container(
width: 40,
height: 20,
child:SVGAImage(this.animationController),
)};
}

_loadAnimation() async {
final videoItem = await SVGAParser.shared.decodeFromAssets(
"assets/svga/first_consume_bg.svga");
this.animationController.videoItem = videoItem;
this
.animationController
.repeat()
.whenComplete(() => this.animationController.videoItem = null);
}

.yaml

assets:

  • assets/svga/first_consume_bg.svga

加载本地文件无效,无报错信息,不显示

@PonyCui
Copy link
Member

PonyCui commented Sep 26, 2021

Please provide a demo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants