Don't clamp interpolated distance along path to 'progress' value between
0 and 1.
Bounce in / Bounce out easings can transform the `progress` to negative
values or values higher than 1. `getTangentForOffset` unfortunately
clamps the input to be between 0 and 1, so we need to handle the `t < 0`
and `t > 1` cases separately.
The `_getColorInBetweenColorStops` interpolated between color stops with
the order of stops inverted between the two it should interpolate with
(comparing with `_getColorInBetweenOpacityStops` confirms this as well).
This means that if there is more than two stops in the gradient, the
second color in the gradient never appears and the third one takes its
place, and the colors are on the wrong stop after that.
- Fixed varying opacity stops across keyframes in the same gradient
- Fixed rounded corners for non-closed curves
- Allow to load Telegram Stickers (.tgs)
```dart
Lottie.asset(
'sticker.tgs',
decoder: LottieComposition.decodeGZip,
)
```
- Expose a hook to customize how to decode zip archives. This is useful
for dotlottie (.lottie) archives when we want
to specify a specific .json file inside the archive
```dart
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');
});
}
```
- Remove name property from `LottieComposition`
- `imageProviderFactory` is not used in .zip file by default anymore.
To restore the old behaviour, use:
```dart
Future<LottieComposition?> decoder(List<int> bytes) {
return LottieComposition.decodeZip(bytes, imageProviderFactory: imageProviderFactory);
}
Lottie.asset('anim.json', imageProviderFactory: imageProviderFactory, decoder: decoder)
```
- Overhaul text layout
- Fix rounded corners modifying already rounded corners
- Support box position in Document Data
- Allow interpolating between gradients with different opacity stops
- De-dupe gradient stops
- Add support for gradient opacity stops
- Added support for rounded corners on shapes and rects
- Add support for text in dynamic properties (ValueDelegate)
- Improve stroke with offset
- Add support for reversed polystar paths
- Enforce order of operations to avoid rounding errors