gif
2.3.0, released 3 years ago by pierluigizagaria.dev
Control GIF playback, speed, frames, and loops using a Flutter animation controller.
WASM-ready
What it does
Allows developers to control GIF playback speed, jump to specific frames, and loop within a frame range using a Flutter animation controller. It also provides GIF caching to avoid reloading frames on every iteration.
AI-written summary of version 2.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to manipulate GIF playback speed or play/pause GIFs programmatically.
- You want to control GIF frames or play within a specific frame range.
- You need GIF caching to optimize loading performance.
Skip it when
- You only need to display a static or automatically looping GIF without programmatic control.
- You are using complex vector animations like Rive or Lottie.
Strengths
- Provides frame-level control over GIFs via an animation controller.
- Includes built-in GIF caching to prevent reloading frames.
- Supports custom frame rates and durations.
Weaknesses
- Not documented for complex non-GIF animation formats.
- Relies on external package limitations for GIF decoding.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
none
GifController _controller = GifController(vsync: this);
Gif(
image: AssetImage("images/animate.gif"),
controller: _controller,
autostart: Autostart.no,
placeholder: (context) => const Text('Loading...'),
onFetchCompleted: () {
_controller.reset();
_controller.forward();
},
)Alternatives
Packages that do the same job and could replace gif.