flutter_avif
3.1.0, released a year ago by an unverified publisher
A flutter plugin to view and encode avif images using libavif.
What it does
Allows Flutter apps to view, decode, cache, and encode AVIF images across multiple platforms. It provides custom widgets like AvifImage and CachedNetworkAvifImage as well as support for animated AVIFs.
AI-written summary of version 3.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Your app needs to render AVIF image formats from assets, files, or network sources.
- You need to encode or decode AVIF images directly within a Flutter application.
- You need support for animated AVIF playback with custom animation controllers.
Skip it when
- You only need standard image formats like JPEG or PNG and want to minimize native binary dependencies.
- You do not need AVIF-specific features.
Strengths
- Comprehensive cross-platform support including mobile, desktop, and web.
- Provides caching capabilities through CachedNetworkAvifImage.
- Supports encoding, decoding, and custom animation control for multiframe AVIFs.
Weaknesses
- Relies on native binaries via libavif which adds platform complexity.
- Not documented for server-side or non-Flutter Dart usage.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 10
Follow the installation instructions on pub.dev to add the package to your Flutter application.
import 'package:flutter_avif/flutter_avif.dart';
AvifImage.asset(
"test.avif",
height: 200,
fit: BoxFit.contain,
);Alternatives
Packages that do the same job and could replace flutter_avif.
- image_cropper
A Flutter plugin for Android, iOS and Web supports cropping images
84Compare - extended_image
Extended image library with caching, placeholders, zoom/pan, slide-out, and crop editor.
80Compare - fc_native_image_resize
A Flutter plugin to resize images via native APIs.
69Compare - any_image_view
Dependency-free Flutter image viewer for raster, vector, Lottie, and network sources.
68Compare
Works with
Packages commonly used together with flutter_avif: ones it builds on, ones built on it, and its own family.