frame_animate_widget 1.1.0 copy "frame_animate_widget: ^1.1.0" to clipboard
frame_animate_widget: ^1.1.0 copied to clipboard

frame animation.

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

然后使用即可.

FrameAnimationImage();

渲染widget后直接播放

//list  图片帧集合,
//interval 切帧时间,
FrameAnimationImage(list, width: 220, height: 200, interval: 50)

渲染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();

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

1
likes
20
pub points
0%
popularity

Publisher

unverified uploader

frame animation.

Repository (GitHub)
View/report issues

License

GPL-3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on frame_animate_widget