Compare commits
25 Commits
v3.0.0-alp
...
master
Author | SHA1 | Date | |
---|---|---|---|
78bbbc895f | |||
5e71dabfa3 | |||
f892a14a7e | |||
84cfa16673 | |||
61756b6613 | |||
7e4d1d3813 | |||
56a69f56d0 | |||
d0deffa2ee | |||
a2e40ecd08 | |||
5a725a064e | |||
8302c4b7e6 | |||
029cee4f0a | |||
eeda2f4de4 | |||
ba039e9423 | |||
3c58936d36 | |||
d0fed17a70 | |||
1c113d961a | |||
17449658bb | |||
e258c610f5 | |||
945285175a | |||
cfb29485b0 | |||
31ab666099 | |||
8881e357c6 | |||
1c665c7756 | |||
cad1806f2e |
7
.github/workflows/analyze-and-test.yaml
vendored
@ -8,15 +8,12 @@ on:
|
||||
jobs:
|
||||
analyze_and_test:
|
||||
name: Flutter analyze
|
||||
strategy:
|
||||
matrix:
|
||||
flutter: ['stable']
|
||||
runs-on: macos-13
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: ${{ matrix.flutter }}
|
||||
channel: 'stable'
|
||||
- run: flutter doctor
|
||||
- run: flutter --version
|
||||
- run: flutter pub get
|
||||
|
22
.github/workflows/coverage.yaml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: Coverage
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
name: Coverage
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
- run: flutter test --coverage
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v5.1.1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
93
CHANGELOG.md
@ -1,48 +1,46 @@
|
||||
## 3.0.0-alpha.4
|
||||
- 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.
|
||||
## 3.3.1
|
||||
- Update `package:archive` to `>=4.0.0` constraint
|
||||
|
||||
- Replace `enableRenderCache` with `renderCache: RenderCache.raster`.
|
||||
The new enum `RenderCacheMode` allows to specify the cache behaviour:
|
||||
- `RenderCacheMode.raster`: Cache the frames as rasterized images living in the GPU memory.
|
||||
- `RenderCacheMode.drawingCommands`: Cache the frames as a list of graphical operations. This will only save CPU
|
||||
work but will use a lot less memory.
|
||||
## 3.3.0
|
||||
- Requires Flutter 3.27 and fix lints.
|
||||
- Add conditional imports to prevent importing `dart:io` on Web targets
|
||||
|
||||
## 3.0.0-alpha.3
|
||||
- Reduce the max memory used when using `enableRenderCache` (now limited to 50MB)
|
||||
- Allow to configure the memory with a global settings:
|
||||
```dart
|
||||
Lottie.renderCacheMaxMemory = 75000000;
|
||||
```
|
||||
## 3.2.0
|
||||
- Apply Blend mode at layer level
|
||||
|
||||
## 3.0.0-alpha.2
|
||||
- Implement auto-orient
|
||||
- Add support for layer blend mode
|
||||
- Require Flutter 3.16
|
||||
## 3.1.3
|
||||
- Update `package:archive` dependency constraints
|
||||
|
||||
## 3.0.0-alpha.1
|
||||
- Add `enableRenderCache` parameter.
|
||||
## 3.1.2
|
||||
- Fixes for some animations generated by lottiefiles.com
|
||||
|
||||
## 3.1.1
|
||||
- Fix rounding-off error on progress calculation
|
||||
- Allow missing end values for integer animations
|
||||
|
||||
## 3.1.0
|
||||
- Use `package:http` for `Lottie.network`. This allows to drop dependency on `dart:html` and be compatible with `wasm`.
|
||||
- Fix new lints
|
||||
|
||||
## 3.0.0
|
||||
- Add `renderCache` parameter.
|
||||
|
||||
```dart
|
||||
Lottie.asset('assets/complex_animation.json',
|
||||
enableRenderCache: true,
|
||||
renderCache: RenderCache.raster,
|
||||
)
|
||||
```
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
There are 2 kinds of caches:
|
||||
|
||||
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).
|
||||
**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.
|
||||
|
||||
- Allow to load Telegram Stickers (.tgs)
|
||||
|
||||
@ -54,7 +52,7 @@ Lottie.asset(
|
||||
```
|
||||
|
||||
- Expose a hook to customize how to decode zip archives. This is useful for dotlottie archives (.lottie) when we want
|
||||
to specify a specific .json file inside the archive
|
||||
to specify a specific .json file inside the archive
|
||||
|
||||
```dart
|
||||
Lottie.asset(
|
||||
@ -69,9 +67,14 @@ Future<LottieComposition?> customDecoder(List<int> bytes) {
|
||||
}
|
||||
```
|
||||
|
||||
- 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:
|
||||
To restore the old behaviour, use:
|
||||
```dart
|
||||
Future<LottieComposition?> decoder(List<int> bytes) {
|
||||
return LottieComposition.decodeZip(bytes, imageProviderFactory: imageProviderFactory);
|
||||
@ -79,11 +82,31 @@ Future<LottieComposition?> decoder(List<int> bytes) {
|
||||
|
||||
Lottie.asset('anim.json', decoder: decoder)
|
||||
```
|
||||
|
||||
- Disable gradient cache optimization when `ValueDelegate.gradientColor` is used
|
||||
- Use `DefaultAssetBundle.of` in `AssetLottie` before fallback to `rootBundle`
|
||||
- Add `BuildContext` optional parameter in `LottieProvider.load`
|
||||
- Fixed varying opacity stops across keyframes in the same gradient
|
||||
- Fixed rounded corners for non-closed curves
|
||||
- Implement auto-orient
|
||||
- Add support for layer blend mode
|
||||
- Require Flutter 3.16
|
||||
|
||||
## 3.0.0-alpha.4
|
||||
|
||||
*See the latest 3.0.0 release*
|
||||
|
||||
## 3.0.0-alpha.3
|
||||
|
||||
*See the latest 3.0.0 release*
|
||||
|
||||
## 3.0.0-alpha.2
|
||||
|
||||
*See the latest 3.0.0 release*
|
||||
|
||||
## 3.0.0-alpha.1
|
||||
|
||||
*See the latest 3.0.0 release*
|
||||
|
||||
## 2.7.0
|
||||
- Support loading Fonts from a zip file
|
||||
|
2
FUNDING.yml
Normal file
@ -0,0 +1,2 @@
|
||||
github: xvrh
|
||||
custom: https://buymeacoffee.com/xvrh
|
@ -10,6 +10,8 @@ This repository is an unofficial conversion of the [Lottie-android](https://gith
|
||||
|
||||
It works on Android, iOS, macOS, linux, windows and web.
|
||||
|
||||
<a href="https://www.buymeacoffee.com/xvrh" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="60" width="217"></a>
|
||||
|
||||
## Usage
|
||||
|
||||
### Simple animation
|
||||
|
@ -10,6 +10,8 @@ This repository is an unofficial conversion of the [Lottie-android](https://gith
|
||||
|
||||
It works on Android, iOS, macOS, linux, windows and web.
|
||||
|
||||
<a href="https://www.buymeacoffee.com/xvrh" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="60" width="217"></a>
|
||||
|
||||
## Usage
|
||||
|
||||
### Simple animation
|
||||
|
@ -18,7 +18,6 @@ linter:
|
||||
avoid_js_rounded_ints: true
|
||||
avoid_positional_boolean_parameters: true
|
||||
avoid_redundant_argument_values: true
|
||||
avoid_returning_null_for_future: true
|
||||
avoid_setters_without_getters: true
|
||||
avoid_type_to_string: true
|
||||
avoid_unused_constructor_parameters: true
|
||||
|
898
example/assets/Tests/BounceEasings.json
Normal file
@ -0,0 +1,898 @@
|
||||
{
|
||||
"v": "5.7.5",
|
||||
"fr": 100,
|
||||
"ip": 0,
|
||||
"op": 400,
|
||||
"w": 800,
|
||||
"h": 1000,
|
||||
"nm": "Comp 1",
|
||||
"ddd": 0,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 0,
|
||||
"ty": 4,
|
||||
"nm": "Bounce out curve",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"hd": false,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"hd": false,
|
||||
"it": [
|
||||
{
|
||||
"ty": "rc",
|
||||
"hd": false,
|
||||
"d": 1,
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"ty": "fl",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0.21176470588235294,
|
||||
0.9176470588235294,
|
||||
1
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"nm": "Fill 1",
|
||||
"mn": "ADBE Vector Graphic - Fill",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tm",
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"e": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"m": 1,
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"hd": false,
|
||||
"p": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"t": 0,
|
||||
"s": [
|
||||
510,
|
||||
100
|
||||
],
|
||||
"i": {
|
||||
"x": [
|
||||
0.2
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.5
|
||||
],
|
||||
"y": [
|
||||
-0.5
|
||||
]
|
||||
},
|
||||
"ti": [
|
||||
-268.19047619047615,
|
||||
-294.42857142857247
|
||||
],
|
||||
"to": [
|
||||
-268.19047619047615,
|
||||
238.90476190476068
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 400,
|
||||
"s": [
|
||||
510,
|
||||
900
|
||||
],
|
||||
"i": {
|
||||
"x": [
|
||||
1
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"sk": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"sa": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ip": 0,
|
||||
"op": 401,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 1,
|
||||
"ty": 4,
|
||||
"nm": "Bounce in curve",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"hd": false,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"hd": false,
|
||||
"it": [
|
||||
{
|
||||
"ty": "rc",
|
||||
"hd": false,
|
||||
"d": 1,
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"ty": "fl",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
1,
|
||||
0.3411764705882353,
|
||||
0.21176470588235294
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"nm": "Fill 1",
|
||||
"mn": "ADBE Vector Graphic - Fill",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tm",
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"e": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"m": 1,
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"hd": false,
|
||||
"p": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"t": 0,
|
||||
"s": [
|
||||
360,
|
||||
100
|
||||
],
|
||||
"i": {
|
||||
"x": [
|
||||
0.5
|
||||
],
|
||||
"y": [
|
||||
1.5
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.8
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"ti": [
|
||||
-268.19047619047615,
|
||||
-294.42857142857247
|
||||
],
|
||||
"to": [
|
||||
-268.19047619047615,
|
||||
238.90476190476068
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 400,
|
||||
"s": [
|
||||
360,
|
||||
900
|
||||
],
|
||||
"i": {
|
||||
"x": [
|
||||
1
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"sk": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"sa": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ip": 0,
|
||||
"op": 401,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 2,
|
||||
"ty": 4,
|
||||
"nm": "Bounce in",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"hd": false,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"hd": false,
|
||||
"it": [
|
||||
{
|
||||
"ty": "rc",
|
||||
"hd": false,
|
||||
"d": 1,
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"ty": "fl",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
1,
|
||||
0.7254901960784313,
|
||||
0.5764705882352941
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"nm": "Fill 1",
|
||||
"mn": "ADBE Vector Graphic - Fill",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tm",
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"e": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"m": 1,
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"hd": false,
|
||||
"p": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"t": 0,
|
||||
"s": [
|
||||
650,
|
||||
100
|
||||
],
|
||||
"i": {
|
||||
"x": [
|
||||
0.5
|
||||
],
|
||||
"y": [
|
||||
1.5
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.8
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"t": 400,
|
||||
"s": [
|
||||
650,
|
||||
900
|
||||
],
|
||||
"i": {
|
||||
"x": [
|
||||
1
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"sk": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"sa": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ip": 0,
|
||||
"op": 401,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 3,
|
||||
"ty": 4,
|
||||
"nm": "Bounce out",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"hd": false,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"hd": false,
|
||||
"it": [
|
||||
{
|
||||
"ty": "rc",
|
||||
"hd": false,
|
||||
"d": 1,
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"ty": "fl",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
1,
|
||||
0.8392156862745098,
|
||||
0.25098039215686274
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"nm": "Fill 1",
|
||||
"mn": "ADBE Vector Graphic - Fill",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tm",
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"e": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"m": 1,
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"hd": false,
|
||||
"p": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"t": 0,
|
||||
"s": [
|
||||
150,
|
||||
100
|
||||
],
|
||||
"i": {
|
||||
"x": [
|
||||
0.2
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.5
|
||||
],
|
||||
"y": [
|
||||
-0.5
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"t": 400,
|
||||
"s": [
|
||||
150,
|
||||
900
|
||||
],
|
||||
"i": {
|
||||
"x": [
|
||||
1
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 2
|
||||
},
|
||||
"sk": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
},
|
||||
"sa": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ip": 0,
|
||||
"op": 401,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
}
|
||||
],
|
||||
"markers": []
|
||||
}
|
522
example/assets/Tests/GradientColorKeyframeAnimation.json
Normal file
@ -0,0 +1,522 @@
|
||||
{
|
||||
"v": "4.8.0",
|
||||
"meta": {
|
||||
"g": "LottieFiles AE 3.5.2",
|
||||
"a": "",
|
||||
"k": "",
|
||||
"d": "",
|
||||
"tc": "#000000"
|
||||
},
|
||||
"fr": 24,
|
||||
"ip": 0,
|
||||
"op": 6912,
|
||||
"w": 312,
|
||||
"h": 312,
|
||||
"nm": "Master_1-4a- GREEN",
|
||||
"ddd": 0,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 30,
|
||||
"ty": 4,
|
||||
"nm": "Background_Layers",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
158,
|
||||
154,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
50,
|
||||
50,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"it": [
|
||||
{
|
||||
"ind": 0,
|
||||
"ty": "sh",
|
||||
"ix": 1,
|
||||
"ks": {
|
||||
"a": 0,
|
||||
"k": {
|
||||
"i": [
|
||||
[
|
||||
149.841,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
-149.841
|
||||
],
|
||||
[
|
||||
-149.841,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
149.841
|
||||
]
|
||||
],
|
||||
"o": [
|
||||
[
|
||||
-149.841,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
149.841
|
||||
],
|
||||
[
|
||||
149.841,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
-149.841
|
||||
]
|
||||
],
|
||||
"v": [
|
||||
[
|
||||
0,
|
||||
-271.311
|
||||
],
|
||||
[
|
||||
-271.311,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
271.311
|
||||
],
|
||||
[
|
||||
271.311,
|
||||
0
|
||||
]
|
||||
],
|
||||
"c": true
|
||||
},
|
||||
"ix": 2
|
||||
},
|
||||
"nm": "Path 1",
|
||||
"mn": "ADBE Vector Shape - Group",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "st",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"ix": 3
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 4
|
||||
},
|
||||
"w": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 5
|
||||
},
|
||||
"lc": 1,
|
||||
"lj": 1,
|
||||
"ml": 4,
|
||||
"bm": 0,
|
||||
"nm": "Stroke 1",
|
||||
"mn": "ADBE Vector Graphic - Stroke",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "gf",
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 60,
|
||||
"ix": 10
|
||||
},
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"g": {
|
||||
"p": 3,
|
||||
"k": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"i": {
|
||||
"x": 0.833,
|
||||
"y": 0.833
|
||||
},
|
||||
"o": {
|
||||
"x": 0.167,
|
||||
"y": 0.167
|
||||
},
|
||||
"t": 898.499,
|
||||
"s": [
|
||||
0.799,
|
||||
0.988,
|
||||
0.875,
|
||||
0.435,
|
||||
0.9,
|
||||
0.994,
|
||||
0.937,
|
||||
0.718,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.072,
|
||||
1,
|
||||
0.536,
|
||||
0.5,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": 0.833,
|
||||
"y": 0.833
|
||||
},
|
||||
"o": {
|
||||
"x": 0.167,
|
||||
"y": 0.167
|
||||
},
|
||||
"t": 1112.312,
|
||||
"s": [
|
||||
0.799,
|
||||
0.988,
|
||||
0.875,
|
||||
0.435,
|
||||
0.9,
|
||||
0.994,
|
||||
0.937,
|
||||
0.718,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.072,
|
||||
1,
|
||||
0.536,
|
||||
0.5,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": 0.833,
|
||||
"y": 0.833
|
||||
},
|
||||
"o": {
|
||||
"x": 0.167,
|
||||
"y": 0.167
|
||||
},
|
||||
"t": 1330.13,
|
||||
"s": [
|
||||
0.799,
|
||||
0.828,
|
||||
0.855,
|
||||
0.554,
|
||||
0.9,
|
||||
0.914,
|
||||
0.928,
|
||||
0.777,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.072,
|
||||
1,
|
||||
0.536,
|
||||
0.5,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": 0.833,
|
||||
"y": 0.833
|
||||
},
|
||||
"o": {
|
||||
"x": 0.167,
|
||||
"y": 0.167
|
||||
},
|
||||
"t": 1420.621,
|
||||
"s": [
|
||||
0.799,
|
||||
0.761,
|
||||
0.847,
|
||||
0.604,
|
||||
0.9,
|
||||
0.88,
|
||||
0.924,
|
||||
0.802,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.072,
|
||||
1,
|
||||
0.536,
|
||||
0.5,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": 0.833,
|
||||
"y": 0.833
|
||||
},
|
||||
"o": {
|
||||
"x": 0.167,
|
||||
"y": 0.167
|
||||
},
|
||||
"t": 4054.455,
|
||||
"s": [
|
||||
0.799,
|
||||
0.761,
|
||||
0.847,
|
||||
0.604,
|
||||
0.9,
|
||||
0.88,
|
||||
0.924,
|
||||
0.802,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.072,
|
||||
1,
|
||||
0.536,
|
||||
0.5,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": 0.833,
|
||||
"y": 0.833
|
||||
},
|
||||
"o": {
|
||||
"x": 0.167,
|
||||
"y": 0.167
|
||||
},
|
||||
"t": 4311.512,
|
||||
"s": [
|
||||
0.799,
|
||||
0.675,
|
||||
0.859,
|
||||
0.894,
|
||||
0.9,
|
||||
0.837,
|
||||
0.929,
|
||||
0.947,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.072,
|
||||
1,
|
||||
0.536,
|
||||
0.5,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": 0.833,
|
||||
"y": 0.833
|
||||
},
|
||||
"o": {
|
||||
"x": 0.167,
|
||||
"y": 0.167
|
||||
},
|
||||
"t": 6439.239,
|
||||
"s": [
|
||||
0.799,
|
||||
0.675,
|
||||
0.859,
|
||||
0.894,
|
||||
0.9,
|
||||
0.837,
|
||||
0.929,
|
||||
0.947,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.072,
|
||||
1,
|
||||
0.536,
|
||||
0.5,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 6672.2724609375,
|
||||
"s": [
|
||||
0.799,
|
||||
0.71,
|
||||
0.098,
|
||||
0.392,
|
||||
0.9,
|
||||
0.855,
|
||||
0.549,
|
||||
0.696,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.072,
|
||||
1,
|
||||
0.536,
|
||||
0.5,
|
||||
1,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"ix": 9
|
||||
}
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0.798,
|
||||
1.032
|
||||
],
|
||||
"ix": 5
|
||||
},
|
||||
"e": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
244.484,
|
||||
0
|
||||
],
|
||||
"ix": 6
|
||||
},
|
||||
"t": 2,
|
||||
"h": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 7
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 8
|
||||
},
|
||||
"nm": "Gradient Fill 1",
|
||||
"mn": "ADBE Vector Graphic - G-Fill",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
-4.865,
|
||||
2.221
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
108.71,
|
||||
108.71
|
||||
],
|
||||
"ix": 3
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 6
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 7
|
||||
},
|
||||
"sk": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 4
|
||||
},
|
||||
"sa": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 5
|
||||
},
|
||||
"nm": "Transformieren"
|
||||
}
|
||||
],
|
||||
"nm": "Ellipse 1",
|
||||
"np": 3,
|
||||
"cix": 2,
|
||||
"bm": 0,
|
||||
"ix": 1,
|
||||
"mn": "ADBE Vector Group",
|
||||
"hd": false
|
||||
}
|
||||
],
|
||||
"ip": -8.80880880880881,
|
||||
"op": 7462.66266266266,
|
||||
"st": -8.80880880880881,
|
||||
"bm": 0
|
||||
}
|
||||
],
|
||||
"markers": []
|
||||
}
|
222
example/assets/Tests/LargeSquare.json
Normal file
@ -0,0 +1,222 @@
|
||||
{
|
||||
"v": "5.9.1",
|
||||
"fr": 25,
|
||||
"ip": 0,
|
||||
"op": 75,
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"nm": "square",
|
||||
"ddd": 0,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 15,
|
||||
"ty": 4,
|
||||
"nm": "Fond Silhouettes",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
600,
|
||||
600,
|
||||
0
|
||||
],
|
||||
"ix": 2,
|
||||
"l": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
600,
|
||||
600,
|
||||
0
|
||||
],
|
||||
"ix": 1,
|
||||
"l": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6,
|
||||
"l": 2
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"it": [
|
||||
{
|
||||
"ind": 0,
|
||||
"ty": "sh",
|
||||
"ix": 1,
|
||||
"ks": {
|
||||
"a": 0,
|
||||
"k": {
|
||||
"i": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"o": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"v": [
|
||||
[
|
||||
-600,
|
||||
600
|
||||
],
|
||||
[
|
||||
600,
|
||||
600
|
||||
],
|
||||
[
|
||||
600,
|
||||
-600
|
||||
],
|
||||
[
|
||||
-600,
|
||||
-600
|
||||
]
|
||||
],
|
||||
"c": true
|
||||
},
|
||||
"ix": 2
|
||||
},
|
||||
"nm": "Tracé 1",
|
||||
"mn": "ADBE Vector Shape - Group",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "fl",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0.561497886508,
|
||||
0.699996708889,
|
||||
0.56712066052,
|
||||
1
|
||||
],
|
||||
"ix": 4
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 5
|
||||
},
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"nm": "Fond 1",
|
||||
"mn": "ADBE Vector Graphic - Fill",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
600,
|
||||
600
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 3
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 6
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 7
|
||||
},
|
||||
"sk": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 4
|
||||
},
|
||||
"sa": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 5
|
||||
},
|
||||
"nm": "Transformer "
|
||||
}
|
||||
],
|
||||
"nm": "Groupe 1",
|
||||
"np": 2,
|
||||
"cix": 2,
|
||||
"bm": 0,
|
||||
"ix": 1,
|
||||
"mn": "ADBE Vector Group",
|
||||
"hd": false
|
||||
}
|
||||
],
|
||||
"ip": 0,
|
||||
"op": 76,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
}
|
||||
],
|
||||
"markers": []
|
||||
}
|
14068
example/assets/Tests/MissingEndValue.json
Normal file
1
example/assets/Tests/NullEndShape.json
Normal file
1
example/assets/Tests/kona_splash_animation.json
Normal file
@ -21,6 +21,6 @@
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>11.0</string>
|
||||
<string>12.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
platform :ios, '11.0'
|
||||
platform :ios, '12.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
@ -15,9 +15,9 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||
|
||||
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
|
||||
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048
|
||||
|
||||
COCOAPODS: 1.14.2
|
||||
COCOAPODS: 1.15.2
|
||||
|
@ -163,7 +163,7 @@
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1430;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
@ -351,7 +351,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
@ -366,8 +366,10 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = TC6K7794M3;
|
||||
DEVELOPMENT_TEAM = PS45A9TPZ7;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -382,8 +384,9 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.xvrh.lottie.example;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
@ -437,7 +440,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@ -486,7 +489,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
@ -502,8 +505,10 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = TC6K7794M3;
|
||||
DEVELOPMENT_TEAM = PS45A9TPZ7;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -518,8 +523,9 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.xvrh.lottie.example;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@ -533,8 +539,10 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = TC6K7794M3;
|
||||
DEVELOPMENT_TEAM = PS45A9TPZ7;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -549,8 +557,9 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.xvrh.lottie.example;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1430"
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -3,7 +3,7 @@ import 'package:flutter/material.dart' hide Image;
|
||||
import 'package:flutter/material.dart' as material;
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
/// This example shows how to cache the animation as a List<Image>.
|
||||
/// This example shows how to cache the animation as a `List<Image>`.
|
||||
/// After the initial cache of each frame, drawing the animation is almost free
|
||||
/// in term of CPU usage.
|
||||
/// The animation will run at a specific framerate (not FrameRate.max) and specific size
|
||||
|
@ -78,7 +78,7 @@ class _Item extends StatelessWidget {
|
||||
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
offset: const Offset(2, 2),
|
||||
blurRadius: 5)
|
||||
]),
|
||||
|
@ -16,8 +16,8 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
|
||||
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
|
||||
|
||||
COCOAPODS: 1.14.2
|
||||
COCOAPODS: 1.15.2
|
||||
|
@ -203,7 +203,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0920;
|
||||
LastUpgradeCheck = 1430;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "The Flutter Authors";
|
||||
TargetAttributes = {
|
||||
33CC10EC2044A3C60003C045 = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1430"
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -5,10 +5,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: archive
|
||||
sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b"
|
||||
sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.4.9"
|
||||
version: "4.0.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -45,26 +45,26 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: collection
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
version: "1.19.0"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
version: "3.1.2"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
version: "3.0.6"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -77,10 +77,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
|
||||
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.3"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -90,134 +90,150 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_colorpicker
|
||||
sha256: "458a6ed8ea480eb16ff892aedb4b7092b2804affd7e046591fb03127e8d8ef8b"
|
||||
sha256: "969de5f6f9e2a570ac660fb7b501551451ea2a1ab9e2097e89475f60e07816ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
version: "1.1.0"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
|
||||
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "5.0.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
golden_toolkit:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: golden_toolkit
|
||||
sha256: "8f74adab33154fe7b731395782797021f97d2edc52f7bfb85ff4f1b5c4a215f0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.15.0"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: http
|
||||
sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139
|
||||
sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
version: "1.2.2"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
js:
|
||||
version: "4.1.2"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||
name: leak_tracker
|
||||
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
version: "10.0.7"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.8"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "5.1.1"
|
||||
logging:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: logging
|
||||
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.3.0"
|
||||
lottie:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "3.0.0-alpha.4"
|
||||
version: "3.3.1"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.16"
|
||||
version: "0.12.16+1"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.0"
|
||||
version: "0.11.1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
version: "1.15.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: mime
|
||||
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
path:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: path
|
||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.3"
|
||||
version: "1.9.0"
|
||||
path_provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: path_provider
|
||||
sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
|
||||
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.5"
|
||||
path_provider_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_android
|
||||
sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72
|
||||
sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
version: "2.2.15"
|
||||
path_provider_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_foundation
|
||||
sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d"
|
||||
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
version: "2.4.1"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -230,47 +246,63 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_platform_interface
|
||||
sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c"
|
||||
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
path_provider_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_windows
|
||||
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
|
||||
sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
version: "2.3.0"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: platform
|
||||
sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59"
|
||||
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
version: "3.1.6"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8
|
||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.7"
|
||||
pointycastle:
|
||||
version: "2.1.8"
|
||||
posix:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pointycastle
|
||||
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
||||
name: posix
|
||||
sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.7.3"
|
||||
version: "6.0.1"
|
||||
shelf:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: shelf
|
||||
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.2"
|
||||
shelf_static:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: shelf_static
|
||||
sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
version: "0.0.0"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -283,10 +315,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.1"
|
||||
version: "1.12.0"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -299,10 +331,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.3.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -315,18 +347,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.1"
|
||||
version: "0.7.3"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
version: "1.4.0"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -335,30 +367,30 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.3.0"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.1.1"
|
||||
version: "1.1.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xdg_directories
|
||||
sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2"
|
||||
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
version: "1.1.0"
|
||||
sdks:
|
||||
dart: ">=3.2.0 <4.0.0"
|
||||
flutter: ">=3.16.0"
|
||||
dart: ">=3.6.0 <4.0.0"
|
||||
flutter: ">=3.27.0"
|
||||
|
@ -5,7 +5,7 @@ publish_to: none
|
||||
version: 2.7.0+1
|
||||
|
||||
environment:
|
||||
sdk: "^3.2.0"
|
||||
sdk: "^3.6.0"
|
||||
|
||||
dependencies:
|
||||
collection:
|
||||
@ -23,7 +23,8 @@ dev_dependencies:
|
||||
flutter_lints:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
golden_toolkit:
|
||||
shelf:
|
||||
shelf_static:
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
9
example/tool/web_server.dart
Normal file
@ -0,0 +1,9 @@
|
||||
import 'dart:io';
|
||||
import 'package:shelf/shelf_io.dart';
|
||||
import 'package:shelf_static/shelf_static.dart';
|
||||
|
||||
void main() async {
|
||||
var server = await serve(
|
||||
createStaticHandler('build/web'), InternetAddress.loopbackIPv4, 0);
|
||||
print('Listen on http://${server.address.host}:${server.port}/index.html');
|
||||
}
|
@ -14,7 +14,6 @@ import '../../model/layer/base_layer.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/dash_path.dart';
|
||||
import '../../utils/misc.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../utils/utils.dart';
|
||||
import '../../value/drop_shadow.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
@ -29,8 +28,8 @@ import 'trim_path_content.dart';
|
||||
|
||||
abstract class BaseStrokeContent
|
||||
implements KeyPathElementContent, DrawingContent {
|
||||
final Path _path = PathFactory.create();
|
||||
final Path _trimPathPath = PathFactory.create();
|
||||
final Path _path = Path();
|
||||
final Path _trimPathPath = Path();
|
||||
final LottieDrawable lottieDrawable;
|
||||
final BaseLayer layer;
|
||||
final List<_PathGroup> _pathGroups = <_PathGroup>[];
|
||||
|
@ -8,7 +8,6 @@ import '../../model/key_path.dart';
|
||||
import '../../model/key_path_element.dart';
|
||||
import '../../model/layer/base_layer.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
import '../keyframe/transform_keyframe_animation.dart';
|
||||
import 'content.dart';
|
||||
@ -42,7 +41,7 @@ class ContentGroup implements DrawingContent, PathContent, KeyPathElement {
|
||||
}
|
||||
|
||||
final Matrix4 _matrix = Matrix4.identity();
|
||||
final Path _path = PathFactory.create();
|
||||
final Path _path = Path();
|
||||
|
||||
@override
|
||||
final String? name;
|
||||
|
@ -7,7 +7,6 @@ import '../../model/key_path.dart';
|
||||
import '../../model/layer/base_layer.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/misc.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
import '../keyframe/base_keyframe_animation.dart';
|
||||
import 'compound_trim_path_content.dart';
|
||||
@ -19,7 +18,7 @@ import 'trim_path_content.dart';
|
||||
class EllipseContent implements PathContent, KeyPathElementContent {
|
||||
static const _ellipseControlPointPercentage = 0.55228;
|
||||
|
||||
final Path _path = PathFactory.create();
|
||||
final Path _path = Path();
|
||||
|
||||
@override
|
||||
final String? name;
|
||||
|
@ -9,7 +9,6 @@ import '../../model/key_path.dart';
|
||||
import '../../model/layer/base_layer.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/misc.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/drop_shadow.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
import '../keyframe/base_keyframe_animation.dart';
|
||||
@ -21,7 +20,7 @@ import 'key_path_element_content.dart';
|
||||
import 'path_content.dart';
|
||||
|
||||
class FillContent implements DrawingContent, KeyPathElementContent {
|
||||
final Path _path = PathFactory.create();
|
||||
final Path _path = Path();
|
||||
final BaseLayer layer;
|
||||
@override
|
||||
final String? name;
|
||||
@ -86,9 +85,6 @@ class FillContent implements DrawingContent, KeyPathElementContent {
|
||||
L.beginSection('FillContent#draw');
|
||||
|
||||
var paint = Paint()..color = _colorAnimation.value;
|
||||
if (layer.blendMode case var blendMode?) {
|
||||
paint.blendMode = blendMode;
|
||||
}
|
||||
var alpha =
|
||||
((parentAlpha / 255.0 * _opacityAnimation.value / 100.0) * 255).round();
|
||||
paint.setAlpha(alpha.clamp(0, 255));
|
||||
|
@ -11,7 +11,6 @@ import '../../model/key_path.dart';
|
||||
import '../../model/layer/base_layer.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/misc.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/drop_shadow.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
import '../keyframe/base_keyframe_animation.dart';
|
||||
@ -29,7 +28,7 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
|
||||
final GradientFill _fill;
|
||||
final _linearGradientCache = <int, Gradient>{};
|
||||
final _radialGradientCache = <int, Gradient>{};
|
||||
final _path = PathFactory.create();
|
||||
final _path = Path();
|
||||
final _paint = Paint();
|
||||
final _paths = <PathContent>[];
|
||||
final BaseKeyframeAnimation<GradientColor, GradientColor> _colorAnimation;
|
||||
|
@ -1,16 +1,15 @@
|
||||
import 'dart:ui';
|
||||
import '../../model/content/merge_paths.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import 'content.dart';
|
||||
import 'content_group.dart';
|
||||
import 'greedy_content.dart';
|
||||
import 'path_content.dart';
|
||||
|
||||
class MergePathsContent implements PathContent, GreedyContent {
|
||||
final Path _firstPath = PathFactory.create();
|
||||
final Path _remainderPath = PathFactory.create();
|
||||
final Path _path = PathFactory.create();
|
||||
final Path _firstPath = Path();
|
||||
final Path _remainderPath = Path();
|
||||
final Path _path = Path();
|
||||
|
||||
final List<PathContent> _pathContents = <PathContent>[];
|
||||
final MergePaths _mergePaths;
|
||||
|
@ -8,7 +8,6 @@ import '../../model/content/shape_trim_path.dart';
|
||||
import '../../model/key_path.dart';
|
||||
import '../../model/layer/base_layer.dart';
|
||||
import '../../utils/misc.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
import '../keyframe/base_keyframe_animation.dart';
|
||||
import 'compound_trim_path_content.dart';
|
||||
@ -24,7 +23,7 @@ class PolystarContent implements PathContent, KeyPathElementContent {
|
||||
/// work otherwise.
|
||||
static const _polystarMagicNumber = .47829;
|
||||
static const _polygonMagicNumber = .25;
|
||||
final _path = PathFactory.create();
|
||||
final _path = Path();
|
||||
|
||||
final LottieDrawable lottieDrawable;
|
||||
final PolystarShape _polystarShape;
|
||||
|
@ -8,7 +8,6 @@ import '../../model/content/shape_trim_path.dart';
|
||||
import '../../model/key_path.dart';
|
||||
import '../../model/layer/base_layer.dart';
|
||||
import '../../utils/misc.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
import '../keyframe/base_keyframe_animation.dart';
|
||||
import 'compound_trim_path_content.dart';
|
||||
@ -19,7 +18,7 @@ import 'rounded_corners_content.dart';
|
||||
import 'trim_path_content.dart';
|
||||
|
||||
class RectangleContent implements KeyPathElementContent, PathContent {
|
||||
final _path = PathFactory.create();
|
||||
final _path = Path();
|
||||
|
||||
@override
|
||||
final String? name;
|
||||
|
@ -7,7 +7,6 @@ import '../../model/key_path.dart';
|
||||
import '../../model/layer/base_layer.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/misc.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
import '../keyframe/base_keyframe_animation.dart';
|
||||
import '../keyframe/transform_keyframe_animation.dart';
|
||||
@ -25,7 +24,7 @@ class RepeaterContent
|
||||
GreedyContent,
|
||||
KeyPathElementContent {
|
||||
final Matrix4 _matrix = Matrix4.identity();
|
||||
final _path = PathFactory.create();
|
||||
final _path = Path();
|
||||
|
||||
final LottieDrawable lottieDrawable;
|
||||
final BaseLayer layer;
|
||||
|
@ -4,7 +4,6 @@ import '../../model/content/shape_path.dart';
|
||||
import '../../model/content/shape_trim_path.dart';
|
||||
import '../../model/layer/base_layer.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../keyframe/shape_keyframe_animation.dart';
|
||||
import 'compound_trim_path_content.dart';
|
||||
import 'content.dart';
|
||||
@ -13,7 +12,7 @@ import 'shape_modifier_content.dart';
|
||||
import 'trim_path_content.dart';
|
||||
|
||||
class ShapeContent implements PathContent {
|
||||
final _path = PathFactory.create();
|
||||
final _path = Path();
|
||||
|
||||
final ShapePath _shape;
|
||||
|
||||
|
@ -38,7 +38,8 @@ class StrokeContent extends BaseStrokeContent {
|
||||
if (_hidden) {
|
||||
return;
|
||||
}
|
||||
paint.color = _colorAnimation.value.withAlpha(paint.color.alpha);
|
||||
paint.color =
|
||||
_colorAnimation.value.withAlpha((paint.color.a * 255).toInt());
|
||||
if (_colorFilterAnimation != null) {
|
||||
paint.colorFilter = _colorFilterAnimation!.value;
|
||||
}
|
||||
|
@ -3,8 +3,8 @@ import '../../l.dart';
|
||||
import '../../value/keyframe.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
|
||||
/// @param <K> Keyframe type
|
||||
/// @param <A> Animation type
|
||||
/// @param K Keyframe type
|
||||
/// @param A Animation type
|
||||
abstract class BaseKeyframeAnimation<K extends Object, A extends Object?> {
|
||||
// This is not a Set because we don't want to create an iterator object on every setProgress.
|
||||
final listeners = <void Function()>[];
|
||||
@ -82,7 +82,7 @@ abstract class BaseKeyframeAnimation<K extends Object, A extends Object?> {
|
||||
/// the current keyframe's interpolator.
|
||||
double getInterpolatedCurrentKeyframeProgress() {
|
||||
var keyframe = getCurrentKeyframe();
|
||||
if (keyframe.isStatic) {
|
||||
if (keyframe.isStatic || keyframe.interpolator == null) {
|
||||
return 0.0;
|
||||
}
|
||||
return keyframe.interpolator!.transform(getLinearCurrentKeyframeProgress());
|
||||
|
@ -69,8 +69,8 @@ class DropShadowKeyframeAnimation {
|
||||
if (callback != null) {
|
||||
_color.setValueCallback(_createCallback(
|
||||
callback, (c) => c?.color ?? const Color(0xff000000)));
|
||||
_opacity.setValueCallback(
|
||||
_createCallback(callback, (c) => c?.color.alpha.toDouble() ?? 255));
|
||||
_opacity
|
||||
.setValueCallback(_createCallback(callback, (c) => c?.color.a ?? 1));
|
||||
_direction.setValueCallback(
|
||||
_createCallback(callback, (c) => c?.direction ?? 0));
|
||||
_distance
|
||||
|
@ -7,16 +7,18 @@ class IntegerKeyframeAnimation extends KeyframeAnimation<int> {
|
||||
|
||||
@override
|
||||
int getValue(Keyframe<int> keyframe, double keyframeProgress) {
|
||||
if (keyframe.startValue == null || keyframe.endValue == null) {
|
||||
if (keyframe.startValue == null) {
|
||||
throw Exception('Missing values for keyframe.');
|
||||
}
|
||||
|
||||
var endValue = keyframe.endValue ?? keyframe.startValue;
|
||||
|
||||
if (valueCallback != null) {
|
||||
var value = valueCallback!.getValueInternal(
|
||||
keyframe.startFrame,
|
||||
keyframe.endFrame,
|
||||
keyframe.startValue,
|
||||
keyframe.endValue,
|
||||
endValue,
|
||||
keyframeProgress,
|
||||
getLinearCurrentKeyframeProgress(),
|
||||
progress);
|
||||
@ -25,7 +27,6 @@ class IntegerKeyframeAnimation extends KeyframeAnimation<int> {
|
||||
}
|
||||
}
|
||||
|
||||
return lerpDouble(keyframe.startValue, keyframe.endValue, keyframeProgress)!
|
||||
.round();
|
||||
return lerpDouble(keyframe.startValue, endValue, keyframeProgress)!.round();
|
||||
}
|
||||
}
|
||||
|
@ -36,8 +36,22 @@ class PathKeyframeAnimation extends KeyframeAnimation<Offset> {
|
||||
_pathMeasureKeyframe = pathKeyframe;
|
||||
}
|
||||
|
||||
return _pathMeasure
|
||||
.getTangentForOffset(keyframeProgress * _pathMeasure.length)!
|
||||
.position;
|
||||
var length = _pathMeasure.length;
|
||||
|
||||
// allow bounce easings to calculate positions outside the path
|
||||
// by using the tangent at the extremities
|
||||
|
||||
if (keyframeProgress < 0) {
|
||||
var tangent = _pathMeasure.getTangentForOffset(0)!;
|
||||
return tangent.position + tangent.vector * (keyframeProgress * length);
|
||||
} else if (keyframeProgress > 1) {
|
||||
var tangent = _pathMeasure.getTangentForOffset(length)!;
|
||||
return tangent.position +
|
||||
tangent.vector * ((keyframeProgress - 1) * length);
|
||||
} else {
|
||||
return _pathMeasure
|
||||
.getTangentForOffset(keyframeProgress * length)!
|
||||
.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,13 @@
|
||||
import 'dart:ui';
|
||||
import '../../model/content/shape_data.dart';
|
||||
import '../../utils/misc.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/keyframe.dart';
|
||||
import '../content/shape_modifier_content.dart';
|
||||
import 'base_keyframe_animation.dart';
|
||||
|
||||
class ShapeKeyframeAnimation extends BaseKeyframeAnimation<ShapeData, Path> {
|
||||
final ShapeData _tempShapeData = ShapeData.empty();
|
||||
final Path _tempPath = PathFactory.create();
|
||||
final Path _tempPath = Path();
|
||||
List<ShapeModifierContent>? _shapeModifiers;
|
||||
|
||||
ShapeKeyframeAnimation(super.keyframes);
|
||||
@ -16,7 +15,7 @@ class ShapeKeyframeAnimation extends BaseKeyframeAnimation<ShapeData, Path> {
|
||||
@override
|
||||
Path getValue(Keyframe<ShapeData> keyframe, double keyframeProgress) {
|
||||
var startShapeData = keyframe.startValue!;
|
||||
var endShapeData = keyframe.endValue!;
|
||||
var endShapeData = keyframe.endValue ?? startShapeData;
|
||||
|
||||
_tempShapeData.interpolateBetween(
|
||||
startShapeData, endShapeData, keyframeProgress);
|
||||
|
@ -77,7 +77,7 @@ class LottieComposition {
|
||||
}
|
||||
jsonFile ??= archive.files.firstWhere((e) => e.name.endsWith('.json'));
|
||||
|
||||
var composition = parseJsonBytes(jsonFile.content as Uint8List);
|
||||
var composition = parseJsonBytes(jsonFile.content);
|
||||
|
||||
for (var image in composition.images.values) {
|
||||
var imagePath = p.posix.join(image.dirName, image.fileName);
|
||||
@ -94,8 +94,8 @@ class LottieComposition {
|
||||
}
|
||||
|
||||
if (found != null) {
|
||||
image.loadedImage ??= await loadImage(
|
||||
composition, image, MemoryImage(found.content as Uint8List));
|
||||
image.loadedImage ??=
|
||||
await loadImage(composition, image, MemoryImage(found.content));
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,8 +103,8 @@ class LottieComposition {
|
||||
var fileName = p.basenameWithoutExtension(font.name).toLowerCase();
|
||||
var existingFont = composition.fonts.values
|
||||
.firstWhereOrNull((f) => f.family.toLowerCase() == fileName);
|
||||
composition._fontsToLoad.add(FontToLoad(font.content as Uint8List,
|
||||
family: existingFont?.family));
|
||||
composition._fontsToLoad
|
||||
.add(FontToLoad(font.content, family: existingFont?.family));
|
||||
}
|
||||
return composition;
|
||||
}
|
||||
@ -225,7 +225,8 @@ class LottieComposition {
|
||||
fps ??= frameRate.framesPerSecond;
|
||||
assert(!fps.isNaN && fps.isFinite && !fps.isNegative);
|
||||
|
||||
var totalFrameCount = seconds * fps;
|
||||
var noOffsetDurationFrames = durationFrames + 0.01;
|
||||
var totalFrameCount = (noOffsetDurationFrames / this.frameRate) * fps;
|
||||
var frameIndex = (totalFrameCount * progress).toInt();
|
||||
var roundedProgress = frameIndex / totalFrameCount;
|
||||
assert(roundedProgress >= 0 && roundedProgress <= 1,
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'dart:typed_data';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import '../lottie.dart';
|
||||
import 'composition.dart';
|
||||
import 'l.dart';
|
||||
@ -95,7 +96,7 @@ class Lottie extends StatefulWidget {
|
||||
|
||||
/// Creates a widget that displays an [LottieComposition] obtained from a [File].
|
||||
static LottieBuilder file(
|
||||
Object /*io.File|html.File*/ file, {
|
||||
Object file, {
|
||||
Animation<double>? controller,
|
||||
FrameRate? frameRate,
|
||||
bool? animate,
|
||||
@ -200,6 +201,8 @@ class Lottie extends StatefulWidget {
|
||||
/// Creates a widget that displays an [LottieComposition] obtained from the network.
|
||||
static LottieBuilder network(
|
||||
String url, {
|
||||
http.Client? client,
|
||||
Map<String, String>? headers,
|
||||
Animation<double>? controller,
|
||||
FrameRate? frameRate,
|
||||
bool? animate,
|
||||
@ -225,6 +228,8 @@ class Lottie extends StatefulWidget {
|
||||
}) =>
|
||||
LottieBuilder.network(
|
||||
url,
|
||||
client: client,
|
||||
headers: headers,
|
||||
controller: controller,
|
||||
frameRate: frameRate,
|
||||
animate: animate,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'composition.dart';
|
||||
import 'frame_rate.dart';
|
||||
import 'lottie.dart';
|
||||
@ -67,6 +68,7 @@ class LottieBuilder extends StatefulWidget {
|
||||
/// Creates a widget that displays an [LottieComposition] obtained from the network.
|
||||
LottieBuilder.network(
|
||||
String src, {
|
||||
http.Client? client,
|
||||
Map<String, String>? headers,
|
||||
this.controller,
|
||||
this.frameRate,
|
||||
@ -91,6 +93,7 @@ class LottieBuilder extends StatefulWidget {
|
||||
this.renderCache,
|
||||
bool? backgroundLoading,
|
||||
}) : lottie = NetworkLottie(src,
|
||||
client: client,
|
||||
headers: headers,
|
||||
imageProviderFactory: imageProviderFactory,
|
||||
decoder: decoder,
|
||||
@ -107,7 +110,7 @@ class LottieBuilder extends StatefulWidget {
|
||||
/// `android.permission.READ_EXTERNAL_STORAGE` permission.
|
||||
///
|
||||
LottieBuilder.file(
|
||||
Object /*io.File|html.File*/ file, {
|
||||
Object file, {
|
||||
this.controller,
|
||||
this.frameRate,
|
||||
this.animate,
|
||||
|
@ -2,54 +2,54 @@ import 'dart:ui';
|
||||
import 'value/drop_shadow.dart';
|
||||
|
||||
/// Property values are the same type as the generic type of their corresponding
|
||||
/// {@link LottieValueCallback}. With this, we can use generics to maintain type safety
|
||||
/// [LottieValueCallback]. With this, we can use generics to maintain type safety
|
||||
/// of the callbacks.
|
||||
///
|
||||
/// Supported properties:
|
||||
/// Transform:
|
||||
/// {@link #TRANSFORM_ANCHOR_POINT}
|
||||
/// {@link #TRANSFORM_POSITION}
|
||||
/// {@link #TRANSFORM_OPACITY}
|
||||
/// {@link #TRANSFORM_SCALE}
|
||||
/// {@link #TRANSFORM_ROTATION}
|
||||
/// {@link #TRANSFORM_SKEW}
|
||||
/// {@link #TRANSFORM_SKEW_ANGLE}
|
||||
/// {TRANSFORM_ANCHOR_POINT}
|
||||
/// {TRANSFORM_POSITION}
|
||||
/// {TRANSFORM_OPACITY}
|
||||
/// {TRANSFORM_SCALE}
|
||||
/// {TRANSFORM_ROTATION}
|
||||
/// {TRANSFORM_SKEW}
|
||||
/// {TRANSFORM_SKEW_ANGLE}
|
||||
///
|
||||
/// Fill:
|
||||
/// {@link #COLOR} (non-gradient)
|
||||
/// {@link #OPACITY}
|
||||
/// {@link #COLOR_FILTER}
|
||||
/// {#COLOR} (non-gradient)
|
||||
/// {#OPACITY}
|
||||
/// {#COLOR_FILTER}
|
||||
///
|
||||
/// Stroke:
|
||||
/// {@link #COLOR} (non-gradient)
|
||||
/// {@link #STROKE_WIDTH}
|
||||
/// {@link #OPACITY}
|
||||
/// {@link #COLOR_FILTER}
|
||||
/// {#COLOR} (non-gradient)
|
||||
/// {#STROKE_WIDTH}
|
||||
/// {#OPACITY}
|
||||
/// {#COLOR_FILTER}
|
||||
///
|
||||
/// Ellipse:
|
||||
/// {@link #POSITION}
|
||||
/// {@link #ELLIPSE_SIZE}
|
||||
/// {#POSITION}
|
||||
/// {#ELLIPSE_SIZE}
|
||||
///
|
||||
/// Polystar:
|
||||
/// {@link #POLYSTAR_POINTS}
|
||||
/// {@link #POLYSTAR_ROTATION}
|
||||
/// {@link #POSITION}
|
||||
/// {@link #POLYSTAR_INNER_RADIUS} (star)
|
||||
/// {@link #POLYSTAR_OUTER_RADIUS}
|
||||
/// {@link #POLYSTAR_INNER_ROUNDEDNESS} (star)
|
||||
/// {@link #POLYSTAR_OUTER_ROUNDEDNESS}
|
||||
/// {#POLYSTAR_POINTS}
|
||||
/// {#POLYSTAR_ROTATION}
|
||||
/// {#POSITION}
|
||||
/// {#POLYSTAR_INNER_RADIUS} (star)
|
||||
/// {#POLYSTAR_OUTER_RADIUS}
|
||||
/// {#POLYSTAR_INNER_ROUNDEDNESS} (star)
|
||||
/// {#POLYSTAR_OUTER_ROUNDEDNESS}
|
||||
///
|
||||
/// Repeater:
|
||||
/// All transform properties
|
||||
/// {@link #REPEATER_COPIES}
|
||||
/// {@link #REPEATER_OFFSET}
|
||||
/// {@link #TRANSFORM_ROTATION}
|
||||
/// {@link #TRANSFORM_START_OPACITY}
|
||||
/// {@link #TRANSFORM_END_OPACITY}
|
||||
/// {#REPEATER_COPIES}
|
||||
/// {#REPEATER_OFFSET}
|
||||
/// {#TRANSFORM_ROTATION}
|
||||
/// {#TRANSFORM_START_OPACITY}
|
||||
/// {#TRANSFORM_END_OPACITY}
|
||||
///
|
||||
/// Layers:
|
||||
/// All transform properties
|
||||
/// {@link #TIME_REMAP} (composition layers only)
|
||||
/// {#TIME_REMAP} (composition layers only)
|
||||
abstract class LottieProperty {
|
||||
/// ColorInt **/
|
||||
static const Color color = Color(0x00000001);
|
||||
|
@ -1,16 +1,32 @@
|
||||
import 'dart:ui';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/collection.dart';
|
||||
import '../../utils/gamma_evaluator.dart';
|
||||
|
||||
// ignore_for_file: avoid_equals_and_hash_code_on_mutable_classes
|
||||
|
||||
class GradientColor {
|
||||
final List<double> positions;
|
||||
final List<Color> colors;
|
||||
|
||||
GradientColor(this.positions, this.colors);
|
||||
const GradientColor(this.positions, this.colors);
|
||||
|
||||
int get size => colors.length;
|
||||
|
||||
void lerp(GradientColor gc1, GradientColor gc2, double progress) {
|
||||
// Fast return in case start and end is the same
|
||||
// or if progress is at start/end or out of [0,1] bounds
|
||||
if (gc1 == gc2) {
|
||||
_copyFrom(gc1);
|
||||
return;
|
||||
} else if (progress <= 0) {
|
||||
_copyFrom(gc1);
|
||||
return;
|
||||
} else if (progress >= 1) {
|
||||
_copyFrom(gc2);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gc1.colors.length != gc2.colors.length) {
|
||||
throw Exception('Cannot interpolate between gradients. '
|
||||
'Lengths vary (${gc1.colors.length} vs ${gc2.colors.length})');
|
||||
@ -59,4 +75,30 @@ class GradientColor {
|
||||
var fraction = (position - startPosition) / (endPosition - startPosition);
|
||||
return GammaEvaluator.evaluate(fraction, startColor, endColor);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (other is! GradientColor) {
|
||||
return false;
|
||||
}
|
||||
return const ListEquality<double>().equals(positions, other.positions) &&
|
||||
const ListEquality<Color>().equals(colors, other.colors);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var result = Object.hashAll(positions);
|
||||
result = 31 * result + Object.hashAll(colors);
|
||||
return result;
|
||||
}
|
||||
|
||||
void _copyFrom(GradientColor other) {
|
||||
for (var i = 0; i < other.colors.length; i++) {
|
||||
positions[i] = other.positions[i];
|
||||
colors[i] = other.colors[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -189,7 +189,8 @@ abstract class BaseLayer implements DrawingContent, KeyPathElement {
|
||||
L.endSection('Layer#parentMatrix');
|
||||
var opacity = transform.opacity?.value ?? 100;
|
||||
var alpha = ((parentAlpha / 255.0 * opacity / 100.0) * 255).toInt();
|
||||
if (!hasMatteOnThisLayer() && !hasMasksOnThisLayer()) {
|
||||
var blendMode = this.blendMode;
|
||||
if (!hasMatteOnThisLayer() && !hasMasksOnThisLayer() && blendMode == null) {
|
||||
_matrix.preConcat(transform.getMatrix());
|
||||
L.beginSection('Layer#drawLayer');
|
||||
drawLayer(canvas, _matrix, parentAlpha: alpha);
|
||||
@ -218,6 +219,7 @@ abstract class BaseLayer implements DrawingContent, KeyPathElement {
|
||||
if (!bounds.isEmpty) {
|
||||
L.beginSection('Layer#saveLayer');
|
||||
_contentPaint.setAlpha(255);
|
||||
_contentPaint.blendMode = blendMode ?? ui.BlendMode.srcOver;
|
||||
canvas.saveLayer(bounds, _contentPaint);
|
||||
L.endSection('Layer#saveLayer');
|
||||
|
||||
|
@ -5,14 +5,13 @@ import '../../animation/keyframe/value_callback_keyframe_animation.dart';
|
||||
import '../../lottie_drawable.dart';
|
||||
import '../../lottie_property.dart';
|
||||
import '../../utils.dart';
|
||||
import '../../utils/path_factory.dart';
|
||||
import '../../value/lottie_value_callback.dart';
|
||||
import 'base_layer.dart';
|
||||
import 'layer.dart';
|
||||
|
||||
class SolidLayer extends BaseLayer {
|
||||
final Paint paint = Paint()..style = PaintingStyle.fill;
|
||||
final Path path = PathFactory.create();
|
||||
final Path path = Path();
|
||||
BaseKeyframeAnimation<ColorFilter, ColorFilter?>? _colorFilterAnimation;
|
||||
BaseKeyframeAnimation<Color, Color?>? _colorAnimation;
|
||||
|
||||
@ -24,21 +23,19 @@ class SolidLayer extends BaseLayer {
|
||||
@override
|
||||
void drawLayer(Canvas canvas, Matrix4 parentMatrix,
|
||||
{required int parentAlpha}) {
|
||||
var backgroundAlpha = layerModel.solidColor.alpha;
|
||||
var backgroundAlpha = layerModel.solidColor.a;
|
||||
if (backgroundAlpha == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
paint.color = _colorAnimation?.value ?? layerModel.solidColor;
|
||||
|
||||
var opacity = transform.opacity?.value ?? 100;
|
||||
var alpha = (parentAlpha /
|
||||
255.0 *
|
||||
(backgroundAlpha / 255.0 * opacity / 100.0) *
|
||||
255.0)
|
||||
.round();
|
||||
var alpha =
|
||||
(parentAlpha / 255.0 * (backgroundAlpha * opacity / 100.0) * 255.0)
|
||||
.round();
|
||||
paint.setAlpha(alpha);
|
||||
if (_colorAnimation?.value case var color?) {
|
||||
paint.color = color;
|
||||
}
|
||||
|
||||
if (_colorFilterAnimation != null) {
|
||||
paint.colorFilter = _colorFilterAnimation!.value;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ class TextLayer extends BaseLayer {
|
||||
} else {
|
||||
fillPaintColor = documentData.color;
|
||||
}
|
||||
_fillPaint.color = fillPaintColor.withAlpha(_fillPaint.color.alpha);
|
||||
_fillPaint.color = fillPaintColor.withValues(alpha: _fillPaint.color.a);
|
||||
|
||||
Color strokePaintColor;
|
||||
if (_strokeColorCallbackAnimation != null) {
|
||||
@ -130,7 +130,8 @@ class TextLayer extends BaseLayer {
|
||||
} else {
|
||||
strokePaintColor = documentData.strokeColor;
|
||||
}
|
||||
_strokePaint.color = strokePaintColor.withAlpha(_strokePaint.color.alpha);
|
||||
_strokePaint.color =
|
||||
strokePaintColor.withValues(alpha: _strokePaint.color.a);
|
||||
|
||||
var opacity = transform.opacity?.value ?? 100;
|
||||
var alpha = opacity * 255 / 100 * parentAlpha ~/ 255;
|
||||
@ -418,7 +419,7 @@ class TextLayer extends BaseLayer {
|
||||
}
|
||||
|
||||
void _drawGlyph(Path path, Paint paint, Canvas canvas) {
|
||||
if (paint.color.alpha == 0) {
|
||||
if (paint.color.a == 0) {
|
||||
return;
|
||||
}
|
||||
if (paint.style == PaintingStyle.stroke && paint.strokeWidth == 0) {
|
||||
@ -440,7 +441,7 @@ class TextLayer extends BaseLayer {
|
||||
|
||||
void _drawCharacter(
|
||||
String character, TextStyle textStyle, Paint paint, Canvas canvas) {
|
||||
if (paint.color.alpha == 0) {
|
||||
if (paint.color.a == 0) {
|
||||
return;
|
||||
}
|
||||
if (paint.style == PaintingStyle.stroke && paint.strokeWidth == 0) {
|
||||
|
@ -76,7 +76,6 @@ class DropShadowEffectParser {
|
||||
_radius = AnimatableValueParser.parseFloat(reader, composition);
|
||||
default:
|
||||
reader.skipValue();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
reader.skipName();
|
||||
|
@ -162,7 +162,7 @@ class GradientColorParser {
|
||||
continue;
|
||||
}
|
||||
if (i == colorStopPositions.length - 1 && position >= colorStopPosition) {
|
||||
return colorStopColors[i].withOpacity(opacity);
|
||||
return colorStopColors[i].withValues(alpha: opacity);
|
||||
}
|
||||
// We found the position in which position is between i - 1 and i.
|
||||
var distanceBetweenColors =
|
||||
@ -171,9 +171,9 @@ class GradientColorParser {
|
||||
var percentage = distanceToLowerColor / distanceBetweenColors;
|
||||
var upperColor = colorStopColors[i];
|
||||
var lowerColor = colorStopColors[i - 1];
|
||||
return GammaEvaluator.evaluate(
|
||||
percentage, lowerColor.withOpacity(1), upperColor.withOpacity(1))
|
||||
.withOpacity(opacity);
|
||||
return GammaEvaluator.evaluate(percentage,
|
||||
lowerColor.withValues(alpha: 1), upperColor.withValues(alpha: 1))
|
||||
.withValues(alpha: opacity);
|
||||
}
|
||||
throw Exception('Unreachable code.');
|
||||
}
|
||||
@ -182,7 +182,7 @@ class GradientColorParser {
|
||||
List<double> opacityStopPositions, List<double> opacityStopOpacities) {
|
||||
if (opacityStopOpacities.length < 2 ||
|
||||
position <= opacityStopPositions[0]) {
|
||||
return color.withOpacity(opacityStopOpacities[0]);
|
||||
return color.withValues(alpha: opacityStopOpacities[0]);
|
||||
}
|
||||
for (var i = 1; i < opacityStopPositions.length; i++) {
|
||||
var opacityStopPosition = opacityStopPositions[i];
|
||||
@ -202,7 +202,7 @@ class GradientColorParser {
|
||||
opacity = lerpDouble(
|
||||
opacityStopOpacities[i - 1], opacityStopOpacities[i], percentage)!;
|
||||
}
|
||||
return color.withOpacity(opacity);
|
||||
return color.withValues(alpha: opacity);
|
||||
}
|
||||
throw Exception('Unreachable code.');
|
||||
}
|
||||
|
@ -228,9 +228,9 @@ class LayerParser {
|
||||
case 15:
|
||||
startFrame = reader.nextDouble();
|
||||
case 16:
|
||||
preCompWidth = reader.nextInt();
|
||||
preCompWidth = reader.nextDouble().toInt();
|
||||
case 17:
|
||||
preCompHeight = reader.nextInt();
|
||||
preCompHeight = reader.nextDouble().toInt();
|
||||
case 18:
|
||||
inFrame = reader.nextDouble();
|
||||
case 19:
|
||||
|
@ -33,9 +33,9 @@ class LottieCompositionParser {
|
||||
while (reader.hasNext()) {
|
||||
switch (reader.selectName(_names)) {
|
||||
case 0:
|
||||
parameters.bounds.width = reader.nextInt();
|
||||
parameters.bounds.width = reader.nextDouble().toInt();
|
||||
case 1:
|
||||
parameters.bounds.height = reader.nextInt();
|
||||
parameters.bounds.height = reader.nextDouble().toInt();
|
||||
case 2:
|
||||
parameters.startFrame = reader.nextDouble();
|
||||
case 3:
|
||||
@ -70,7 +70,7 @@ class LottieCompositionParser {
|
||||
}
|
||||
}
|
||||
assert(parameters.startFrame != parameters.endFrame,
|
||||
'startFrame == endFrame ($parameters.startFrame)');
|
||||
'startFrame == endFrame (${parameters.startFrame})');
|
||||
assert(
|
||||
parameters.frameRate > 0, 'invalid framerate: ${parameters.frameRate}');
|
||||
|
||||
|
@ -66,7 +66,7 @@ class Buffer {
|
||||
}
|
||||
|
||||
/// Reads and discards {@code byteCount} bytes from this source. Throws an
|
||||
/// {@link java.io.EOFException} if the source is exhausted before the
|
||||
/// [Exception] if the source is exhausted before the
|
||||
/// requested bytes can be skipped.
|
||||
void skip(int byteCount) {
|
||||
_start += byteCount;
|
||||
|
@ -3,6 +3,8 @@ import 'buffer.dart';
|
||||
import 'json_scope.dart';
|
||||
import 'json_utf8_reader.dart';
|
||||
|
||||
// ignore_for_file: unintended_html_in_doc_comment
|
||||
|
||||
/// Reads a JSON (<a href="http://www.ietf.org/rfc/rfc7159.txt">RFC 7159</a>)
|
||||
/// encoded value as a stream of tokens. This stream includes both literal
|
||||
/// values (strings, numbers, booleans, and nulls) as well as the begin and
|
||||
|
@ -857,7 +857,7 @@ class JsonUtf8Reader extends JsonReader {
|
||||
|
||||
/// Returns the next character in the stream that is neither whitespace nor a
|
||||
/// part of a comment. When this returns, the returned character is always at
|
||||
/// {@code buffer.getByte(0)}.
|
||||
/// {buffer.getByte(0)}.
|
||||
int _nextNonWhitespace(bool throwOnEof) {
|
||||
// This code uses ugly local variables 'p' and 'l' representing the 'pos'
|
||||
// and 'limit' fields respectively. Using locals rather than fields saves
|
||||
|
@ -74,7 +74,7 @@ class AssetLottie extends LottieProvider {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other.runtimeType != runtimeType) return false;
|
||||
return other is AssetLottie &&
|
||||
other.keyName == keyName &&
|
||||
|
@ -1,69 +1 @@
|
||||
import 'dart:ui' as ui;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import '../composition.dart';
|
||||
import '../lottie_image_asset.dart';
|
||||
import 'load_fonts.dart';
|
||||
import 'load_image.dart';
|
||||
import 'lottie_provider.dart';
|
||||
import 'provider_io.dart' if (dart.library.html) 'provider_web.dart' as io;
|
||||
|
||||
@immutable
|
||||
class FileLottie extends LottieProvider {
|
||||
FileLottie(
|
||||
this.file, {
|
||||
super.imageProviderFactory,
|
||||
super.decoder,
|
||||
super.backgroundLoading,
|
||||
});
|
||||
|
||||
final Object /*io.File|html.File*/ file;
|
||||
|
||||
@override
|
||||
Future<LottieComposition> load({BuildContext? context}) {
|
||||
return sharedLottieCache.putIfAbsent(this, () async {
|
||||
LottieComposition composition;
|
||||
var args = (file, decoder);
|
||||
if (backgroundLoading) {
|
||||
composition = await compute(loadFileAndParse, args);
|
||||
} else {
|
||||
composition = await loadFileAndParse(args);
|
||||
}
|
||||
|
||||
for (var image in composition.images.values) {
|
||||
image.loadedImage ??= await _loadImage(composition, image);
|
||||
}
|
||||
|
||||
await ensureLoadedFonts(composition);
|
||||
|
||||
return composition;
|
||||
});
|
||||
}
|
||||
|
||||
Future<ui.Image?> _loadImage(
|
||||
LottieComposition composition, LottieImageAsset lottieImage) {
|
||||
var imageProvider = getImageProvider(lottieImage);
|
||||
|
||||
imageProvider ??= io.loadImageForFile(file, lottieImage);
|
||||
|
||||
return loadImage(composition, lottieImage, imageProvider);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
if (other.runtimeType != runtimeType) return false;
|
||||
return other is FileLottie && io.areFilesEqual(file, other.file);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => file.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => '$runtimeType(file: ${io.filePath(file)})';
|
||||
}
|
||||
|
||||
Future<LottieComposition> loadFileAndParse(
|
||||
(Object, LottieDecoder?) args) async {
|
||||
var bytes = await io.loadFile(args.$1);
|
||||
return await LottieComposition.fromBytes(bytes, decoder: args.$2);
|
||||
}
|
||||
export 'file_provider_no_io.dart' if (dart.library.io) 'file_provider_io.dart';
|
||||
|
77
lib/src/providers/file_provider_io.dart
Normal file
@ -0,0 +1,77 @@
|
||||
import 'dart:io' as io;
|
||||
import 'dart:ui' as ui;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import '../composition.dart';
|
||||
import '../lottie_image_asset.dart';
|
||||
import 'load_fonts.dart';
|
||||
import 'load_image.dart';
|
||||
import 'lottie_provider.dart';
|
||||
|
||||
@immutable
|
||||
class FileLottie extends LottieProvider {
|
||||
FileLottie(
|
||||
Object file, {
|
||||
super.imageProviderFactory,
|
||||
super.decoder,
|
||||
super.backgroundLoading,
|
||||
}) : file = file as io.File,
|
||||
assert(
|
||||
!kIsWeb,
|
||||
'Lottie.file is not supported on Flutter Web. '
|
||||
'Consider using either Lottie.asset or Lottie.network instead.',
|
||||
);
|
||||
|
||||
final io.File file;
|
||||
|
||||
@override
|
||||
Future<LottieComposition> load({BuildContext? context}) {
|
||||
return sharedLottieCache.putIfAbsent(this, () async {
|
||||
LottieComposition composition;
|
||||
var args = (file, decoder);
|
||||
if (backgroundLoading) {
|
||||
composition = await compute(_loadFileAndParse, args);
|
||||
} else {
|
||||
composition = await _loadFileAndParse(args);
|
||||
}
|
||||
|
||||
for (var image in composition.images.values) {
|
||||
image.loadedImage ??= await _loadImage(composition, image);
|
||||
}
|
||||
|
||||
await ensureLoadedFonts(composition);
|
||||
|
||||
return composition;
|
||||
});
|
||||
}
|
||||
|
||||
Future<ui.Image?> _loadImage(
|
||||
LottieComposition composition, LottieImageAsset lottieImage) {
|
||||
var imageProvider = getImageProvider(lottieImage);
|
||||
|
||||
var imagePath = p.url
|
||||
.join(p.dirname(file.path), lottieImage.dirName, lottieImage.fileName);
|
||||
imageProvider ??= FileImage(io.File(imagePath));
|
||||
|
||||
return loadImage(composition, lottieImage, imageProvider);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (other.runtimeType != runtimeType) return false;
|
||||
return other is FileLottie && file.path == other.file.path;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => file.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => '$runtimeType(file: ${file.path})';
|
||||
}
|
||||
|
||||
Future<LottieComposition> _loadFileAndParse(
|
||||
(io.File, LottieDecoder?) args) async {
|
||||
var bytes = await args.$1.readAsBytes();
|
||||
return await LottieComposition.fromBytes(bytes, decoder: args.$2);
|
||||
}
|
26
lib/src/providers/file_provider_no_io.dart
Normal file
@ -0,0 +1,26 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import '../composition.dart';
|
||||
import 'lottie_provider.dart';
|
||||
|
||||
@immutable
|
||||
class FileLottie extends LottieProvider {
|
||||
FileLottie(
|
||||
this.file, {
|
||||
super.imageProviderFactory,
|
||||
super.decoder,
|
||||
super.backgroundLoading,
|
||||
}) : assert(
|
||||
!kIsWeb,
|
||||
'Lottie.file is not supported on Flutter Web. '
|
||||
'Consider using either Lottie.asset or Lottie.network instead.',
|
||||
);
|
||||
|
||||
final Object file;
|
||||
|
||||
@override
|
||||
Future<LottieComposition> load({BuildContext? context}) {
|
||||
throw UnimplementedError(
|
||||
'FileLottie provider is not supported on Web platform');
|
||||
}
|
||||
}
|
@ -50,7 +50,7 @@ class MemoryLottie extends LottieProvider {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other.runtimeType != runtimeType) return false;
|
||||
|
||||
//TODO(xha): compare bytes content
|
||||
|
@ -2,24 +2,26 @@ import 'dart:async';
|
||||
import 'dart:ui' as ui;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:path/path.dart' as p;
|
||||
import '../composition.dart';
|
||||
import '../lottie_image_asset.dart';
|
||||
import 'load_fonts.dart';
|
||||
import 'load_image.dart';
|
||||
import 'lottie_provider.dart';
|
||||
import 'provider_io.dart' if (dart.library.html) 'provider_web.dart' as network;
|
||||
|
||||
@immutable
|
||||
class NetworkLottie extends LottieProvider {
|
||||
NetworkLottie(
|
||||
this.url, {
|
||||
this.client,
|
||||
this.headers,
|
||||
super.imageProviderFactory,
|
||||
super.decoder,
|
||||
super.backgroundLoading,
|
||||
});
|
||||
|
||||
final http.Client? client;
|
||||
final String url;
|
||||
final Map<String, String>? headers;
|
||||
|
||||
@ -28,21 +30,30 @@ class NetworkLottie extends LottieProvider {
|
||||
return sharedLottieCache.putIfAbsent(this, () async {
|
||||
var resolved = Uri.base.resolve(url);
|
||||
|
||||
LottieComposition composition;
|
||||
var args = (resolved, headers, decoder);
|
||||
if (backgroundLoading) {
|
||||
composition = await compute(downloadAndParse, args);
|
||||
} else {
|
||||
composition = await downloadAndParse(args);
|
||||
var client = this.client ?? http.Client();
|
||||
try {
|
||||
var bytes = await client.readBytes(resolved, headers: headers);
|
||||
|
||||
LottieComposition composition;
|
||||
if (backgroundLoading) {
|
||||
composition = await compute(parseJsonBytes, (bytes, decoder));
|
||||
} else {
|
||||
composition =
|
||||
await LottieComposition.fromBytes(bytes, decoder: decoder);
|
||||
}
|
||||
|
||||
for (var image in composition.images.values) {
|
||||
image.loadedImage ??= await _loadImage(resolved, composition, image);
|
||||
}
|
||||
|
||||
await ensureLoadedFonts(composition);
|
||||
|
||||
return composition;
|
||||
} finally {
|
||||
if (this.client == null) {
|
||||
client.close();
|
||||
}
|
||||
}
|
||||
|
||||
for (var image in composition.images.values) {
|
||||
image.loadedImage ??= await _loadImage(resolved, composition, image);
|
||||
}
|
||||
|
||||
await ensureLoadedFonts(composition);
|
||||
|
||||
return composition;
|
||||
});
|
||||
}
|
||||
|
||||
@ -60,7 +71,7 @@ class NetworkLottie extends LottieProvider {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other.runtimeType != runtimeType) return false;
|
||||
return other is NetworkLottie &&
|
||||
other.url == url &&
|
||||
@ -73,9 +84,3 @@ class NetworkLottie extends LottieProvider {
|
||||
@override
|
||||
String toString() => '$runtimeType(url: $url)';
|
||||
}
|
||||
|
||||
Future<LottieComposition> downloadAndParse(
|
||||
(Uri, Map<String, String>?, LottieDecoder?) args) async {
|
||||
var bytes = await network.loadHttp(args.$1, headers: args.$2);
|
||||
return await LottieComposition.fromBytes(bytes, decoder: args.$3);
|
||||
}
|
||||
|
@ -1,44 +0,0 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import '../lottie_image_asset.dart';
|
||||
|
||||
final HttpClient _sharedHttpClient = HttpClient()..autoUncompress = false;
|
||||
|
||||
Future<Uint8List> loadHttp(Uri uri, {Map<String, String>? headers}) async {
|
||||
var request = await _sharedHttpClient.getUrl(uri);
|
||||
headers?.forEach((String name, String value) {
|
||||
request.headers.add(name, value);
|
||||
});
|
||||
final response = await request.close();
|
||||
if (response.statusCode != HttpStatus.ok) {
|
||||
throw Exception('Http error. Status code: ${response.statusCode} for $uri');
|
||||
}
|
||||
|
||||
final bytes = await consolidateHttpClientResponseBytes(response);
|
||||
if (bytes.lengthInBytes == 0) {
|
||||
throw Exception('NetworkImage is an empty file: $uri');
|
||||
}
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
Future<Uint8List> loadFile(Object file) {
|
||||
return (file as File).readAsBytes();
|
||||
}
|
||||
|
||||
bool areFilesEqual(Object f1, Object f2) =>
|
||||
(f1 as File).path == (f2 as File).path;
|
||||
|
||||
String filePath(Object file) {
|
||||
return (file as File).path;
|
||||
}
|
||||
|
||||
ImageProvider loadImageForFile(Object file, LottieImageAsset lottieImage) {
|
||||
var fileIo = file as File;
|
||||
|
||||
var imagePath = p.url
|
||||
.join(p.dirname(fileIo.path), lottieImage.dirName, lottieImage.fileName);
|
||||
return FileImage(File(imagePath));
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
import 'dart:html';
|
||||
import 'dart:typed_data';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import '../lottie_image_asset.dart';
|
||||
|
||||
// ignore_for_file: avoid_web_libraries_in_flutter
|
||||
|
||||
Future<Uint8List> loadHttp(Uri uri, {Map<String, String>? headers}) async {
|
||||
var request = await HttpRequest.request(uri.toString(),
|
||||
requestHeaders: headers, responseType: 'blob');
|
||||
|
||||
return _loadBlob(request.response as Blob);
|
||||
}
|
||||
|
||||
Future<Uint8List> loadFile(Object file) {
|
||||
return _loadBlob(file as File);
|
||||
}
|
||||
|
||||
Future<Uint8List> _loadBlob(Blob file) async {
|
||||
var reader = FileReader();
|
||||
reader.readAsArrayBuffer(file);
|
||||
|
||||
await reader.onLoadEnd.first;
|
||||
if (reader.readyState != FileReader.DONE) {
|
||||
throw Exception('Error while reading blob');
|
||||
}
|
||||
|
||||
return reader.result! as Uint8List;
|
||||
}
|
||||
|
||||
String filePath(Object file) {
|
||||
return (file as File).relativePath ?? '';
|
||||
}
|
||||
|
||||
bool areFilesEqual(Object f1, Object f2) => f1 == f2;
|
||||
|
||||
ImageProvider loadImageForFile(Object file, LottieImageAsset lottieImage) {
|
||||
throw UnimplementedError();
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
import 'dart:math';
|
||||
import 'dart:ui';
|
||||
import 'path_factory.dart';
|
||||
|
||||
Path dashPath(
|
||||
Path source, {
|
||||
@ -10,7 +9,7 @@ Path dashPath(
|
||||
assert(intervals.length >= 2);
|
||||
phase ??= 0;
|
||||
|
||||
var dest = PathFactory.create();
|
||||
var dest = Path();
|
||||
for (final metric in source.computeMetrics()) {
|
||||
for (var dash in _dashes(metric.length, intervals, phase)) {
|
||||
dest.addPath(metric.extractPath(dash.left, dash.right), Offset.zero);
|
||||
|
@ -26,18 +26,25 @@ class GammaEvaluator {
|
||||
}
|
||||
|
||||
static Color evaluate(double fraction, Color startColor, Color endColor) {
|
||||
// Fast return in case start and end is the same
|
||||
// or if fraction is at start/end or out of [0,1] bounds
|
||||
if (startColor == endColor) {
|
||||
return startColor;
|
||||
} else if (fraction <= 0) {
|
||||
return startColor;
|
||||
} else if (fraction >= 1) {
|
||||
return endColor;
|
||||
}
|
||||
var startA = startColor.alpha / 255.0;
|
||||
var startR = startColor.red / 255.0;
|
||||
var startG = startColor.green / 255.0;
|
||||
var startB = startColor.blue / 255.0;
|
||||
|
||||
var endA = endColor.alpha / 255.0;
|
||||
var endR = endColor.red / 255.0;
|
||||
var endG = endColor.green / 255.0;
|
||||
var endB = endColor.blue / 255.0;
|
||||
var startA = startColor.a;
|
||||
var startR = startColor.r;
|
||||
var startG = startColor.g;
|
||||
var startB = startColor.b;
|
||||
|
||||
var endA = endColor.a;
|
||||
var endR = endColor.r;
|
||||
var endG = endColor.g;
|
||||
var endB = endColor.b;
|
||||
|
||||
// convert from sRGB to linear
|
||||
startR = _eocfSRgb(startR);
|
||||
|
@ -96,7 +96,7 @@ class MiscUtils {
|
||||
/// it to the accumulator list.
|
||||
///
|
||||
/// Any {@link KeyPathElementContent} should call through to this as its implementation of
|
||||
/// {@link KeyPathElementContent#resolveKeyPath(KeyPath, int, List, KeyPath)}.
|
||||
/// {KeyPathElementContent#resolveKeyPath(KeyPath, int, List, KeyPath)}.
|
||||
static void resolveKeyPath(
|
||||
KeyPath keyPath,
|
||||
int depth,
|
||||
|
@ -1,164 +0,0 @@
|
||||
import 'dart:typed_data';
|
||||
import 'dart:ui';
|
||||
|
||||
class PathFactory {
|
||||
static Path create() {
|
||||
return Path();
|
||||
}
|
||||
}
|
||||
|
||||
class FakePath implements Path {
|
||||
@override
|
||||
PathFillType fillType = PathFillType.nonZero;
|
||||
|
||||
@override
|
||||
void addArc(Rect oval, double startAngle, double sweepAngle) {
|
||||
// TODO: implement addArc
|
||||
}
|
||||
|
||||
@override
|
||||
void addOval(Rect oval) {
|
||||
// TODO: implement addOval
|
||||
}
|
||||
|
||||
@override
|
||||
void addPath(Path path, Offset offset, {Float64List? matrix4}) {
|
||||
// TODO: implement addPath
|
||||
}
|
||||
|
||||
@override
|
||||
void addPolygon(List<Offset> points, bool close) {
|
||||
// TODO: implement addPolygon
|
||||
}
|
||||
|
||||
@override
|
||||
void addRRect(RRect rrect) {
|
||||
// TODO: implement addRRect
|
||||
}
|
||||
|
||||
@override
|
||||
void addRect(Rect rect) {
|
||||
// TODO: implement addRect
|
||||
}
|
||||
|
||||
@override
|
||||
void arcTo(
|
||||
Rect rect, double startAngle, double sweepAngle, bool forceMoveTo) {
|
||||
// TODO: implement arcTo
|
||||
}
|
||||
|
||||
@override
|
||||
void arcToPoint(Offset arcEnd,
|
||||
{Radius radius = Radius.zero,
|
||||
double rotation = 0.0,
|
||||
bool largeArc = false,
|
||||
bool clockwise = true}) {
|
||||
// TODO: implement arcToPoint
|
||||
}
|
||||
|
||||
@override
|
||||
void close() {
|
||||
// TODO: implement close
|
||||
}
|
||||
|
||||
@override
|
||||
PathMetrics computeMetrics({bool forceClosed = false}) {
|
||||
// TODO: implement computeMetrics
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
void conicTo(double x1, double y1, double x2, double y2, double w) {
|
||||
// TODO: implement conicTo
|
||||
}
|
||||
|
||||
@override
|
||||
bool contains(Offset point) {
|
||||
// TODO: implement contains
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
void cubicTo(
|
||||
double x1, double y1, double x2, double y2, double x3, double y3) {
|
||||
// TODO: implement cubicTo
|
||||
}
|
||||
|
||||
@override
|
||||
void extendWithPath(Path path, Offset offset, {Float64List? matrix4}) {
|
||||
// TODO: implement extendWithPath
|
||||
}
|
||||
|
||||
@override
|
||||
Rect getBounds() {
|
||||
// TODO: implement getBounds
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
void lineTo(double x, double y) {
|
||||
// TODO: implement lineTo
|
||||
}
|
||||
|
||||
@override
|
||||
void moveTo(double x, double y) {
|
||||
// TODO: implement moveTo
|
||||
}
|
||||
|
||||
@override
|
||||
void quadraticBezierTo(double x1, double y1, double x2, double y2) {
|
||||
// TODO: implement quadraticBezierTo
|
||||
}
|
||||
|
||||
@override
|
||||
void relativeArcToPoint(Offset arcEndDelta,
|
||||
{Radius radius = Radius.zero,
|
||||
double rotation = 0.0,
|
||||
bool largeArc = false,
|
||||
bool clockwise = true}) {
|
||||
// TODO: implement relativeArcToPoint
|
||||
}
|
||||
|
||||
@override
|
||||
void relativeConicTo(double x1, double y1, double x2, double y2, double w) {
|
||||
// TODO: implement relativeConicTo
|
||||
}
|
||||
|
||||
@override
|
||||
void relativeCubicTo(
|
||||
double x1, double y1, double x2, double y2, double x3, double y3) {
|
||||
// TODO: implement relativeCubicTo
|
||||
}
|
||||
|
||||
@override
|
||||
void relativeLineTo(double dx, double dy) {
|
||||
// TODO: implement relativeLineTo
|
||||
}
|
||||
|
||||
@override
|
||||
void relativeMoveTo(double dx, double dy) {
|
||||
// TODO: implement relativeMoveTo
|
||||
}
|
||||
|
||||
@override
|
||||
void relativeQuadraticBezierTo(double x1, double y1, double x2, double y2) {
|
||||
// TODO: implement relativeQuadraticBezierTo
|
||||
}
|
||||
|
||||
@override
|
||||
void reset() {
|
||||
// TODO: implement reset
|
||||
}
|
||||
|
||||
@override
|
||||
Path shift(Offset offset) {
|
||||
// TODO: implement shift
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
Path transform(Float64List matrix4) {
|
||||
// TODO: implement transform
|
||||
throw UnimplementedError();
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import 'dart:ui';
|
||||
import 'package:flutter/animation.dart';
|
||||
import 'path_factory.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class PathInterpolator extends Curve {
|
||||
@ -24,7 +24,7 @@ class PathInterpolator extends Curve {
|
||||
}
|
||||
|
||||
void _initialize() {
|
||||
final path = PathFactory.create();
|
||||
final path = Path();
|
||||
path.moveTo(0.0, 0.0);
|
||||
path.cubicTo(controlX1, controlY1, controlX2, controlY2, 1.0, 1.0);
|
||||
|
||||
|
@ -4,12 +4,11 @@ import '../animation/content/trim_path_content.dart';
|
||||
import '../l.dart';
|
||||
import '../utils.dart';
|
||||
import 'misc.dart';
|
||||
import 'path_factory.dart';
|
||||
|
||||
class Utils {
|
||||
static Path createPath(
|
||||
Offset startPoint, Offset endPoint, Offset? cp1, Offset? cp2) {
|
||||
var path = PathFactory.create();
|
||||
var path = Path();
|
||||
path.moveTo(startPoint.dx, startPoint.dy);
|
||||
|
||||
if (cp1 != null &&
|
||||
|
@ -331,7 +331,7 @@ class ResolvedValueDelegate<T> {
|
||||
/// to multiple contents. In that case, the callbacks's value will apply to all of them.
|
||||
/// <p>
|
||||
/// Internally, this will check if the {@link KeyPath} has already been resolved with
|
||||
/// {@link #resolveKeyPath(KeyPath)} and will resolve it if it hasn't.
|
||||
/// {#resolveKeyPath(KeyPath)} and will resolve it if it hasn't.
|
||||
void addValueCallback(LottieDrawable drawable) {
|
||||
var invalidate = false;
|
||||
if (valueDelegate.keyPath.isEmpty) {
|
||||
|
183
pubspec.lock
@ -5,34 +5,39 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
|
||||
sha256: "88399e291da5f7e889359681a8f64b18c5123e03576b01f32a6a276611e511c3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "64.0.0"
|
||||
version: "78.0.0"
|
||||
_macros:
|
||||
dependency: transitive
|
||||
description: dart
|
||||
source: sdk
|
||||
version: "0.3.3"
|
||||
analyzer:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
|
||||
sha256: "62899ef43d0b962b056ed2ebac6b47ec76ffd003d5f7c4e4dc870afe63188e33"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.0"
|
||||
version: "7.1.0"
|
||||
archive:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: archive
|
||||
sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b"
|
||||
sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.4.9"
|
||||
version: "4.0.2"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
||||
sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
version: "2.6.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -69,34 +74,34 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
version: "1.19.0"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
version: "3.1.2"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
version: "3.0.6"
|
||||
dart_style:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: dart_style
|
||||
sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368"
|
||||
sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.4"
|
||||
version: "3.0.1"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -105,14 +110,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
version: "7.0.1"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -122,10 +135,10 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
|
||||
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "5.0.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -139,83 +152,123 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
js:
|
||||
dependency: transitive
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: js
|
||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||
name: http
|
||||
sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
version: "1.2.2"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.2"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.7"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.8"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "5.1.1"
|
||||
macros:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: macros
|
||||
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.3-main.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.16"
|
||||
version: "0.12.16+1"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.0"
|
||||
version: "0.11.1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
version: "1.15.0"
|
||||
package_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_config
|
||||
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
|
||||
sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
path:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: path
|
||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.3"
|
||||
pointycastle:
|
||||
version: "1.9.0"
|
||||
posix:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pointycastle
|
||||
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
||||
name: posix
|
||||
sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.7.3"
|
||||
version: "6.0.1"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: pub_semver
|
||||
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||
sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.1.5"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
version: "0.0.0"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -228,10 +281,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.1"
|
||||
version: "1.12.0"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -244,10 +297,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.3.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -260,18 +313,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.1"
|
||||
version: "0.7.3"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
version: "1.4.0"
|
||||
vector_math:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -280,30 +333,38 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.3.0"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: watcher
|
||||
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
|
||||
sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.1.1"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
version: "1.1.0"
|
||||
yaml:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: yaml
|
||||
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.2.0 <4.0.0"
|
||||
flutter: ">=3.16.0"
|
||||
dart: ">=3.6.0 <4.0.0"
|
||||
flutter: ">=3.27.0"
|
||||
|
14
pubspec.yaml
@ -1,16 +1,21 @@
|
||||
name: lottie
|
||||
description: Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
|
||||
version: 3.0.0-alpha.4
|
||||
version: 3.3.1
|
||||
repository: https://github.com/xvrh/lottie-flutter
|
||||
|
||||
funding:
|
||||
- https://www.buymeacoffee.com/xvrh
|
||||
- https://github.com/sponsors/xvrh
|
||||
|
||||
environment:
|
||||
sdk: '^3.2.0'
|
||||
flutter: '>=3.16.0'
|
||||
sdk: '^3.6.0'
|
||||
flutter: '>=3.27.0'
|
||||
|
||||
dependencies:
|
||||
archive: ^3.0.0
|
||||
archive: ^4.0.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
http: ^1.0.0
|
||||
path: ^1.8.0
|
||||
vector_math: ^2.1.0
|
||||
|
||||
@ -20,4 +25,5 @@ dev_dependencies:
|
||||
flutter_lints:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
pub_semver:
|
||||
yaml:
|
||||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |