Skip to content
pubscout

lottie

3.8.2, released 3 weeks ago by xaha.dev

Render After Effects JSON animations natively in Flutter.

WASM-readyRock solid
$ flutter pub add lottie
Source repository

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.

Works with

Packages commonly used together with lottie: ones it builds on, ones built on it, and its own family.