- 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,
),
]),
)
- Add support for drop shadows.
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.
Lottie.network(
'https://example.does.not.exist/lottie.json',
errorBuilder: (context, exception, stackTrace) {
return const Text('😢');
},
);
- Add
onWarning
to be notified when a warning occurs during the animation parsing or painting. Previously the warnings where written in an internallogger
.Lottie.asset('animation.json' onWarning: (warning) { _logger.info(warning); }, );
- Various bug fixes
- Implement
RenderBox.computeDryLayout
- Migrate to null safety
- Fix some rendering bugs
- Add an image delegate to dynamically change images
- Allow to use an imageProviderFactory with a zip file
- Fix a crash for some lottie file with empty paths.
- Fix Flutter Web compilation error
- 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 though the AnimationController will invalidate the widget 60 times per seconds).
A new propertyframeRate
allows to opt-out this behavior and have the widget to repaint at the device frame rate (FrameRate.max
). - Automatically add a
RepaintBoundary
around the widget. SinceLottie
animations are generally complex to paint, aRepaintBoundary
will separate the animation with the rest of the app and improve performance. A new propertyaddRepaintBoundary
allows to opt-out this behavior. - Fix a bug where we would call
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
- Support loading animation from network in a web app
- Fix a couple of bugs with the web dev compiler
- Support color value stored as RGB, not RGBA
- Support latest version of the
characters
package
- 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 work if the the operand shape is entirely contained within the first shape. If you need to cut out one shape from another shape, use an even-odd fill type instead of using merge paths.
Merge paths can be enabled with:
Lottie.asset('file.json', options: LottieOptions(enableMergePaths: true));
- Export the
Marker
class
- Fix a bug with a wrongly clipped rectangle.
- Fix a bug with dashed path
- Fix a bug with rounded rectangle shape
- Fix a bug with "repeater" content
- Support dashed path
- Specify a version range for the dependency on
characters
.
- Add
LottieDelegates
a group of options to customize the lottie animation at runtime. ie: Dynamically modify color, position, size, text... of every elements of the animation. - Correctly display Linear and Radial Gradients
- Integrate latest changes from Lottie-android
- Add a [repeat] parameter to specify if the automatic animation should loop.
- Add the [animate], [reverse], [repeat] properties on
LottieBuilder
- Fix bug with
onLoaded
callback when theLottieProvider
is changed
- Fix a big bug in the path transformation code. A lot more animations look correct now.
- Improve readme
- (internal) Add golden tests
- Support loading the animation and its images from a zip file
- Breaking:
LottieComposition.fromBytes
andfromByteData
are now asynchronous.
- Support images in animation
- Basic support for text in animation (work in progress)
- Support Polystar shape
- Reorganize examples.
- Implement
Lottie.network
,Lottie.file
andLottie.memory
- Fix analysis lints
- Initial conversion of lottie-android to Dart/Flutter