lottie
3.8.2, released 3 weeks ago by xaha.dev
Render After Effects JSON animations natively in Flutter.
What it does
Provides a Lottie widget that loads, parses, and displays Lottie JSON files from assets, network, or memory. It supports custom AnimationControllers, delegates for runtime property changes, and low‑level drawing on a Canvas.
AI-written summary of version 3.8.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display complex vector animations exported from After Effects.
- You want to control animation playback programmatically with an AnimationController.
- You need to modify animation properties at runtime (color, text, opacity).
Skip it when
- You only need simple static images or GIFs.
- You require platform‑specific animation APIs not supported by Lottie (e.g., custom physics).
Strengths
- Zero‑dependency on native libraries; pure Dart implementation.
- Supports all major platforms (Android, iOS, web, desktop).
- Rich API for custom control and property delegation.
- Efficient rendering with pre‑computed easing tables.
Weaknesses
- Requires JSON files; not suitable for hand‑drawn frames.
- Performance can be heavy for very large compositions.
- Limited to Lottie format; cannot import other animation formats.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Add dependency in pubspec, import package, and use Lottie.asset/network/memory. No native setup required.
import 'package:lottie/lottie.dart';
Lottie.asset('assets/animation.json', width: 200, height: 200);Alternatives
Packages that do the same job and could replace lottie.
- smooth_page_indicator
If you only need simple page indicators rather than full Lottie animations.
83Compare
Works with
Packages commonly used together with lottie: ones it builds on, ones built on it, and its own family.
- archivelottie depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- vector_mathlottie depends on itVector math library for 2D/3D/4D vectors, matrices, quaternions, and geometry.
- easy_stepperBuilt on lottieGuide users step by step. A fully customizable, beautiful and easy-to-use Flutter stepper to show progress or collect information in organized steps.
- animated_emojiBuilt on lottieWidget that displays animated emojis from the Noto Animated Emoji set
- material_dialogsBuilt on lottieCreate animated, simple, and stylish Material dialogs and bottom sheets in Flutter.
- cool_alertBuilt on lottieAnimated alert dialog widget for success, error, warning, confirm, and loading states
- animated_iconBuilt on lottieAn animated icon package supporting customization like color, animation, hover, and callbacks.
- coconut_design_systemBuilt on lottieReusable UI component library for Flutter with theme-aware components and built-in animations.