frame_animate_widget

Creator: coderz1093

Last updated:

0 purchases

frame_animate_widget Image
frame_animate_widget Images
Add to Cart

Description:

frame animate widget

frame_animation_widget #
flutter 实现帧动画
Getting Started #
This project is a starting point for a Flutter application.
how to use #
💻 添加依赖
在 pubspec.yaml中添加:
frame_animate_widget: ^1.0.0

copied to clipboard
然后使用即可.
FrameAnimationImage();
copied to clipboard
渲染widget后直接播放
//list 图片帧集合,
//interval 切帧时间,
FrameAnimationImage(list, width: 220, height: 200, interval: 50)

copied to clipboard
渲染widget后手动控制播放
//由GlobalKey跨widget改变状态
final GlobalKey<FrameAnimationImageState> _key = new GlobalKey<FrameAnimationImageState>();

//start: false 此时要告诉widget 开始不播放动画
FrameAnimationImage(_key, list,
width: 220, height: 200, interval: 50, start: false)

//控制 widget 开始/继续;结束;重新开始 播放帧
_key.currentState.startAnimation();
_key.currentState.stopAnimation();
_key.currentState.reStartAnimation();

copied to clipboard
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.