flutter_animated 0.0.3 flutter_animated: ^0.0.3 copied to clipboard
Animated gif/apng support in flutter.
flutter_animated #
Animated images (GIF/APNG/WebP) support in flutter.
The plugin is under construction.
It lacks of basic features, and has got a number of serious issues.
USAGE #
- require it in
pubspec.yaml
:
dependencies:
flutter:
sdk: flutter
flutter_animated: any
- use it
// import
import 'flutter_animated/animated_gif.dart';
// fetch a gif
final Uint8List imgBytes = await http.readBytes('https://some.site/some.gif');
// generate a Widget for the gif
final Widget gifWidget = new AnimatedGif.memory(imgBytes);
- notes
Currently the only constructor is .memory
.
The AnimatedGif
is inherits from Image
and StatefulWidget
.
TODO #
- POOR PERFORMANCE it takes seconds to decode large images
- BUG malfunctioning alpha composition
use the platform
for high performance- android
- android.graphics.Movie
- https://github.com/koral--/android-gif-drawable
- ios
- android
- method to set speed/FPS
- method to controll play/pause
- method to set forward/reverse
- support input more than UInt8List
- asset path, url, etc.
- support more formats like APNG and WebP
- proper testing
- proper example
- proper annotation and doc generating