Skip to content

Releases: xvrh/lottie-flutter

v2.1.0

14 Dec 13:12
8dcb052
Compare
Choose a tag to compare
  • Improve the cache to ensure that the animation is available on the first frame.
    The method AssetLottie('anim.json').load() returns a SynchronousFuture if it has been loaded previously.
  • Expose the 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'));
}

v2.0.0

09 Nov 13:39
8ce429c
Compare
Choose a tag to compare

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,
    ),
  ),
);

v1.4.3

14 Sep 11:22
fc450a8
Compare
Choose a tag to compare
  • Fixed some lints with Flutter 3.3.

v1.4.2

25 Aug 09:56
c0bc257
Compare
Choose a tag to compare
  • Use FilterQuality.low as default to draw image layers.

v1.4.1

03 Aug 09:53
0e7499d
Compare
Choose a tag to compare
  • Allow AlignmentGeometry for alignment.

v1.4.0

27 Jul 09:12
d8f5b87
Compare
Choose a tag to compare
  • Added filterQuality property to control the performance vs quality trade-off to use when drawing images

v1.3.0

14 Apr 20:21
bc3eb46
Compare
Choose a tag to compare
  • Added support for rounded corners on shapes and rects
  • Add support for text in dynamic properties (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',
    ),
  ]),
)
  • Improve stroke with offset
  • Add support for reversed polystar paths
  • Enforce order of operations to avoid rounding errors

v1.2.2

14 Feb 09:08
Compare
Choose a tag to compare
  • Internal maintenance: fix lints for Flutter 2.10

v1.2.1

24 Sep 21:43
2979b62
Compare
Choose a tag to compare

fix: Revert Cubic to PathInterpolator.cubic

v1.2.0

19 Sep 18:58
Compare
Choose a tag to compare
  • 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,
      ),
    ),
  ]),
)