NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev, #281 most downloaded on pub.dev
Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
Latest stable
3.8.2
Last release 20 days ago
02 Nov 2026
Release timing varies
gaps range from 2 weeks to 8 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
74 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Fix keyframes with different easing curves sharing one interpolator when their control points hash alike, e.g. a (1, 0, 0, 1) ease playing linearly on
(1, 0, 0, 1) ease playing linearly once an animation with linear keyframes was loadedFloat64List, three times smallerFix a frame showing the value of the first keyframe when it lands exactly between two keyframes, typically inside a pre-composition (since 3.7.0)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Raise the minimum SDK to Dart 3.13 / Flutter 3.47
.lottie file overriding the app's fonts of the same family: they now only apply to the animationLottie in a view whose display is no longer known, e.g. on Windows after the displays changedSupport Lottie slots: a property with a sid takes its value from the root slots, like lottie-web Schedule no engine frame while the automatic animatio
Support Lottie slots: a property with a sid takes its value from the root slots, like lottie-web
Schedule no engine frame while the automatic animation draws the same thing after its first loop, e.g. during a pause (Lottie.skipUnchangedFrames turns it off)
Don't repaint while a keyframe keeps the same value
Load an animation's images 8 at a time instead of one by one
Clip cropping fits (BoxFit.cover, fitWidth, fitHeight, none) to the widget's box, like Image
Fix auto-oriented layers spinning, and add their Rotation on top, like After Effects
Fix a one-frame blink when a layer starts exactly on a frame, and a rounding error that could show the previous frame
Fix a hold keyframe hiding the value of the last keyframe, and a crash on a property with a single keyframe
Fix a rectangle not following an animated Round Corners, and a constant blur on a fill disappearing after the first frame
Fix ValueDelegate.dropShadow ignoring the alpha of its color, and pass the current colors to ValueDelegate.gradientColor callbacks
Fix crashes with gradient color delegates, and when LottieDrawable is created with value delegates
Reduce CPU usage by scheduling frames at the composition frame rate instead of every vsync
Reduce CPU usage by scheduling frames at the composition frame rate instead of every vsync
Fix cropped fits (e.g. BoxFit.cover) ignoring alignment and always cropping from the top-left
Throttle the auto-animation to the composition frame rate to reduce rebuilds
Add text animator range selectors (color, stroke, stroke width, tracking and opacity over an animated index/percent range)
ValueDelegate.path to override a shape's outline at runtime.lottie/.zip handling: skip manifest.json and normalize bundled image pathsApply the ShapeFill fill type consistently when drawing and computing bounds in FillContent
ShapeFill fill type consistently when drawing and computing bounds in FillContentRemove usages of deprecated methods in package:vector_math
Update package:archive to >=4.0.0 constraint
Requires Flutter 3.27 and fix lints.
Apply Blend mode at layer level
Update package:archive dependency constraints
package:archive dependency constraintsFixes for some animations generated by lottiefiles.com
Fix rounding-off error on progress calculation
Use package:http for Lottie.network. This allows to drop dependency on dart:html and be compatible with wasm.
Add support for layer blend mode
Add support for layer blend mode
Allow to load Telegram Stickers (.tgs)
Lottie.asset(
'sticker.tgs',
decoder: LottieComposition.decodeGZip,
)
renderCache parameter.Lottie.asset('assets/complex_animation.json',
renderCache: RenderCache.raster,
)
Opt-in to a special render mode where the frames of the animation are lazily rendered and kept in a cache.
Subsequent runs of the animation are cheaper to render.
There are 2 kinds of caches:
RenderCache.raster: keep the frame rasterized in the cache (as [dart:ui.Image]).
Subsequent runs of the animation are very cheap for both the CPU and GPU but it takes
a lot of memory.
RenderCache.drawingCommands: keep the frame as a list of graphical operations ([dart:ui.Picture]).
Subsequent runs of the animation are cheaper for the CPU but not for the GPU.
Lottie.asset(
'animation.lottie',
decoder: customDecoder,
);
Future<LottieComposition?> customDecoder(List<int> bytes) {
return LottieComposition.decodeZip(bytes, filePicker: (files) {
return files.firstWhere((f) => f.name == 'animations/cat.json');
});
}
Add backgroundLoading parameter to Lottie.asset|network|file|memory.
If backgroundLoading is true, the animation will be loaded in a background isolate.
This is useful for large animations that can take a long time to parse and block the UI work.
Remove the name property from LottieComposition
imageProviderFactory is not used in .zip file by default anymore.
To restore the old behaviour, use:
Future<LottieComposition?> decoder(List<int> bytes) {
return LottieComposition.decodeZip(bytes, imageProviderFactory: imageProviderFactory);
}
Lottie.asset('anim.json', decoder: decoder)
ValueDelegate.gradientColor is usedDefaultAssetBundle.of in AssetLottie before fallback to rootBundleBuildContext optional parameter in LottieProvider.loadAdd backgroundLoading parameter to Lottie.asset|network|file|memory. If backgroundLoading is true, the animation will be loaded in a background isolat
Add backgroundLoading parameter to Lottie.asset|network|file|memory.
If backgroundLoading is true, the animation will be loaded in a background isolate.
This is useful for large animations that can take a long time to parse and block the UI work.
Replace enableRenderCache with renderCache: RenderCache.raster.
The new class RenderCache allows to specify the cache behaviour:
RenderCache.raster: Cache the frames as rasterized images living in the GPU memory.RenderCache.drawingCommands: Cache the frames as a list of graphical operations. This will only save CPU
work but will use a lot less memory.Reduce the max memory used when using enableRenderCache (now limited to 50MB)
enableRenderCache (now limited to 50MB)Lottie.renderCacheMaxMemory = 75000000;
Add support for layer blend mode
Add enableRenderCache parameter.
enableRenderCache parameter.Lottie.asset('assets/complex_animation.json',
enableRenderCache: true,
)
It allows to opt into a mode where the frames of the animation are rendered lazily in an offscreen cache. Subsequent runs of the animation will be very cheap to render.
This is useful is the animation is complex and can consume a lot of energy from the battery. It's a trade-off to lower the CPU usage at the cost of an increased memory usage.
The render cache is managed internally and will release the memory once the animation is disposed.
The cache is shared between all animations. If 2 Lottie widget are rendered at the same size, they will render only
once.
Any change in the configuration of the animation (delegates, frame rate etc...) will clear the cache. Any change in the size will invalidate the cache. The cache use the final size visible on the screen (with all transforms applied).
Lottie.asset(
'sticker.tgs',
decoder: LottieComposition.decodeGZip,
)
Lottie.asset(
'animation.lottie',
decoder: customDecoder,
);
Future<LottieComposition?> customDecoder(List<int> bytes) {
return LottieComposition.decodeZip(bytes, filePicker: (files) {
return files.firstWhere((f) => f.name == 'animations/cat.json');
});
}
LottieCompositionimageProviderFactory is not used in .zip file by default anymore.
To restore the old behaviour, use:Future<LottieComposition?> decoder(List<int> bytes) {
return LottieComposition.decodeZip(bytes, imageProviderFactory: imageProviderFactory);
}
Lottie.asset('anim.json', imageProviderFactory: imageProviderFactory, decoder: decoder)
ValueDelegate.gradientColor is usedDefaultAssetBundle.of in AssetLottie before fallback to rootBundleBuildContext optional parameter in LottieProvider.loadSupport loading Fonts from a zip file
Accept List instead of Uint8List in LottieComposition.fromBytes
List<int> instead of Uint8List in LottieComposition.fromBytesAdd layer-level opacity option to LottieOptions
Require minimum Dart 3.0.0 and Flutter 3.10.0
Fix a bug when running on the web due to bitwise operations difference.
Fix an assertion for null ShapeTrimPathType.type.
Fixed a failed assertion (dirty: is not true) when calling setState inside onLoaded callback.
Apply the latest fixes from Lottie-Android:
Apply the latest fixes from Lottie-Android:
Improve the cache to ensure that the animation is available on the first frame. The method AssetLottie('anim.json').load() returns a SynchronousFuture
AssetLottie('anim.json').load() returns a SynchronousFuture if it has been loaded previously.LottieCache singleton.
It allows to change the cache behaviour and clear the entries.void main() {
Lottie.cache.maximumSize = 10;
Lottie.cache.clear();
Lottie.cache.evict(NetworkLottie('https://lottie.com/anim.json'));
}
AssetLottie('anim.json').load() returns a SynchronousFuture if it has been loaded previously.LottieCache singleton.
It allows to change the cache behaviour and clear the entries.void main() {
Lottie.cache.maximumSize = 10;
Lottie.cache.clear();
Lottie.cache.evict(NetworkLottie('https://lottie.com/anim.json'));
}
Breaking change: the lottie widget will be smaller if it relies on the intrinsic size of the composition. Previously the lottie parser was automatical…
Breaking change: the lottie widget will be smaller if it relies on the intrinsic size of the composition. Previously the lottie parser was automatically multiplying the size of the composition by window.devicePixelRatio. This was incorrect as it results in a widget of a different size depending on the pixel ratio of the monitor. Furthermore, it created some bugs when the property window.devicePixelRatio was not available immediately at the start of the app (on Android release builds).
The code can be adapted to specify explicitly the size of the animation with width, height and fit properties.
Scaffold(
body: Center(
child: Lottie.asset(
'assets/LottieLogo1.json',
height: 800,
fit: BoxFit.contain,
),
),
);
Fixed some lints with Flutter 3.3.
Use FilterQuality.low as default to draw image layers.
FilterQuality.low as default to draw image layers.Allow AlignmentGeometry for alignment.
AlignmentGeometry for alignment.Added filterQuality property to control the performance vs quality trade-off to use when drawing images
filterQuality property to control the performance vs quality trade-off to use when drawing imagesAdded support for rounded corners on shapes and rects
ValueDelegate)Example:
Lottie.asset(
'assets/DynamicText.json',
delegates: LottieDelegates(values: [
ValueDelegate.text(
['Text layer'], // The path to the text element to change
value: 'The new text',
),
]),
)
Internal maintenance: fix lints for Flutter 2.10
fix: Revert Cubic to PathInterpolator.cubic
fix: Revert Cubic to PathInterpolator.cubic
Add support for gaussian blurs.
Example to blur some elements dynamically:
Lottie.asset(
'assets/AndroidWave.json',
delegates: LottieDelegates(values: [
ValueDelegate.blurRadius(
['**'], // The path to the element to blur
value: 20,
),
]),
)
Example to add a shadow dynamically:
Lottie.asset(
'assets/animation.json',
delegates: LottieDelegates(values: [
ValueDelegate.dropShadow(
['**'], // The path to the elements with shadow
value: const DropShadow(
color: Colors.blue,
direction: 140,
distance: 60,
radius: 10,
),
),
]),
)
Add errorBuilder callback to provide an alternative widget in case an error occurs during loading. `dart Lottie.network( 'https://example.does.not.exi
errorBuilder callback to provide an alternative widget in case an error occurs during loading.Lottie.network(
'https://example.does.not.exist/lottie.json',
errorBuilder: (context, exception, stackTrace) {
return const Text('😢');
},
);
onWarning to be notified when a warning occurs during the animation parsing or painting.
Previously the warnings where written in an internal logger.Lottie.asset('animation.json'
onWarning: (warning) {
_logger.info(warning);
},
);
Implement RenderBox.computeDryLayout
RenderBox.computeDryLayoutAdd an image delegate to dynamically change images
Fix compilation error with the Web platform
Fix imageProviderFactory to work with zip files
LottieDelegatesimageProviderFactory to work with zip filesNothing published for this version
Fix rendering bug with matte layers
Nothing published for this version
Fix Flutter Web compilation error
Fix Flutter Web compilation error
Performance improvement for complex animations.
Performance improvement for complex animations.
Runs the animation at the frame rate specified in the json file (ie. An animation encoded with a 20 FPS will only be paint 20 times per seconds even t
frameRate property allows to opt-out this behaviour and have the widget to repaint at the device frame rate (FrameRate.max).addRepaintBoundary allows to opt-out this behaviour.markNeedPaint when the animation was not changing. This removes unnecessary paints in animations with static periods.frameRate allows to opt-out this behavior and have the widget to repaint at the device frame rate
(FrameRate.max).RepaintBoundary around the widget. Since Lottie animations are generally complex to paint, a
RepaintBoundary will separate the animation with the rest of the app and improve performance. A new property addRepaintBoundary
allows to opt-out this behavior.markNeedPaint when the animation was not changing. This removes unnecessary paints in
animations with static periods.Remove direct dependencies on dart:io to support Flutter Web
Remove direct dependencies on dart:io to support Flutter Web
Support loading animation from network in a web app
Support color value stored as RGB, not RGBA
Disable "Merge paths" by default and provide an option to enable them. This is the same behavior as in Lottie-android. Merge paths currently don't wor
Merge paths can be enabled with:
Lottie.asset('file.json', options: LottieOptions(enableMergePaths: true));
Support latest version of the characters package
characters package- Export the Marker class
Marker classFix a bug with a wrongly clipped rectangle.
Fix a bug with a wrongly clipped rectangle.
- Fix a bug with dashed path
One column per quarter.