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

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

@Avalanching-QY

Description

@Avalanching-QY

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions