Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
d0deffa2ee | |||
a2e40ecd08 | |||
5a725a064e | |||
8302c4b7e6 | |||
029cee4f0a | |||
eeda2f4de4 | |||
ba039e9423 | |||
3c58936d36 | |||
d0fed17a70 | |||
1c113d961a | |||
17449658bb | |||
e258c610f5 | |||
945285175a | |||
cfb29485b0 | |||
31ab666099 |
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@v4.5.0
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
17
CHANGELOG.md
@ -1,3 +1,20 @@
|
||||
## 3.2.0
|
||||
- Apply Blend mode at layer level
|
||||
|
||||
## 3.1.3
|
||||
- Update `package:archive` dependency constraints
|
||||
|
||||
## 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.
|
||||
|
||||
|
2
FUNDING.yml
Normal file
@ -0,0 +1,2 @@
|
||||
github: xvrh
|
||||
custom: https://buymeacoffee.com/xvrh
|
@ -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
|
||||
|
14068
example/assets/Tests/MissingEndValue.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"
|
||||
|
@ -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: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
|
||||
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.4.10"
|
||||
version: "3.6.1"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -53,18 +53,18 @@ packages:
|
||||
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,39 +90,31 @@ 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:
|
||||
@ -131,93 +123,117 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
js:
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||
name: leak_tracker
|
||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
version: "10.0.5"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.5"
|
||||
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: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "5.0.0"
|
||||
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"
|
||||
version: "3.2.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"
|
||||
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: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
|
||||
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
version: "2.1.5"
|
||||
path_provider_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_android
|
||||
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
|
||||
sha256: "8c4967f8b7cb46dc914e178daa29813d83ae502e0529d7b0478330616a691ef7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
version: "2.2.14"
|
||||
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:
|
||||
@ -238,18 +254,18 @@ packages:
|
||||
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: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
|
||||
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.4"
|
||||
version: "3.1.6"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -258,14 +274,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
pointycastle:
|
||||
dependency: transitive
|
||||
shelf:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: pointycastle
|
||||
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
||||
name: shelf
|
||||
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.7.3"
|
||||
version: "1.4.1"
|
||||
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
|
||||
@ -315,18 +339,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.1"
|
||||
version: "0.7.2"
|
||||
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 +359,30 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.2.5"
|
||||
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: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.2.0"
|
||||
version: "1.1.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xdg_directories
|
||||
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
||||
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "1.1.0"
|
||||
sdks:
|
||||
dart: ">=3.2.0 <4.0.0"
|
||||
flutter: ">=3.16.0"
|
||||
dart: ">=3.5.0 <4.0.0"
|
||||
flutter: ">=3.24.0"
|
||||
|
@ -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');
|
||||
}
|
@ -85,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));
|
||||
|
@ -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());
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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,7 @@
|
||||
import 'dart:io' as io;
|
||||
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 +97,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, {
|
||||
io.File file, {
|
||||
Animation<double>? controller,
|
||||
FrameRate? frameRate,
|
||||
bool? animate,
|
||||
@ -200,6 +202,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 +229,8 @@ class Lottie extends StatefulWidget {
|
||||
}) =>
|
||||
LottieBuilder.network(
|
||||
url,
|
||||
client: client,
|
||||
headers: headers,
|
||||
controller: controller,
|
||||
frameRate: frameRate,
|
||||
animate: animate,
|
||||
|
@ -1,6 +1,8 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io' as io;
|
||||
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 +69,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 +94,7 @@ class LottieBuilder extends StatefulWidget {
|
||||
this.renderCache,
|
||||
bool? backgroundLoading,
|
||||
}) : lottie = NetworkLottie(src,
|
||||
client: client,
|
||||
headers: headers,
|
||||
imageProviderFactory: imageProviderFactory,
|
||||
decoder: decoder,
|
||||
@ -107,7 +111,7 @@ class LottieBuilder extends StatefulWidget {
|
||||
/// `android.permission.READ_EXTERNAL_STORAGE` permission.
|
||||
///
|
||||
LottieBuilder.file(
|
||||
Object /*io.File|html.File*/ file, {
|
||||
io.File 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);
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
76
lib/src/providers/file_provider_io.dart
Normal file
@ -0,0 +1,76 @@
|
||||
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(
|
||||
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 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,12 +30,16 @@ class NetworkLottie extends LottieProvider {
|
||||
return sharedLottieCache.putIfAbsent(this, () async {
|
||||
var resolved = Uri.base.resolve(url);
|
||||
|
||||
var client = this.client ?? http.Client();
|
||||
try {
|
||||
var bytes = await client.readBytes(resolved, headers: headers);
|
||||
|
||||
LottieComposition composition;
|
||||
var args = (resolved, headers, decoder);
|
||||
if (backgroundLoading) {
|
||||
composition = await compute(downloadAndParse, args);
|
||||
composition = await compute(parseJsonBytes, (bytes, decoder));
|
||||
} else {
|
||||
composition = await downloadAndParse(args);
|
||||
composition =
|
||||
await LottieComposition.fromBytes(bytes, decoder: decoder);
|
||||
}
|
||||
|
||||
for (var image in composition.images.values) {
|
||||
@ -43,6 +49,11 @@ class NetworkLottie extends LottieProvider {
|
||||
await ensureLoadedFonts(composition);
|
||||
|
||||
return composition;
|
||||
} finally {
|
||||
if (this.client == null) {
|
||||
client.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
@ -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,
|
||||
|
@ -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) {
|
||||
|
145
pubspec.lock
@ -5,34 +5,39 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
|
||||
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "64.0.0"
|
||||
version: "72.0.0"
|
||||
_macros:
|
||||
dependency: transitive
|
||||
description: dart
|
||||
source: sdk
|
||||
version: "0.3.2"
|
||||
analyzer:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
|
||||
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.0"
|
||||
version: "6.7.0"
|
||||
archive:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: archive
|
||||
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
|
||||
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.4.10"
|
||||
version: "3.6.1"
|
||||
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:
|
||||
@ -77,26 +82,26 @@ packages:
|
||||
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: "64b717484993e85315d0c04081b6fca9ef8bac8c2cb794b2e15810250b335913"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.4"
|
||||
version: "3.0.0"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -109,10 +114,10 @@ packages:
|
||||
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 +127,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,46 +144,86 @@ 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: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.5"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.5"
|
||||
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: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "5.0.0"
|
||||
macros:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: macros
|
||||
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.2-main.4"
|
||||
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:
|
||||
@ -191,20 +236,12 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: path
|
||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.3"
|
||||
pointycastle:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pointycastle
|
||||
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.7.3"
|
||||
version: "1.9.0"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: pub_semver
|
||||
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||
@ -260,18 +297,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.1"
|
||||
version: "0.7.2"
|
||||
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,6 +317,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.2.5"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -292,10 +337,10 @@ packages:
|
||||
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:
|
||||
@ -305,5 +350,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
sdks:
|
||||
dart: ">=3.2.0 <4.0.0"
|
||||
flutter: ">=3.16.0"
|
||||
dart: ">=3.5.0 <4.0.0"
|
||||
flutter: ">=3.18.0-18.0.pre.54"
|
||||
|
@ -1,19 +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
|
||||
version: 3.2.0
|
||||
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'
|
||||
flutter: '>=3.24.0'
|
||||
|
||||
dependencies:
|
||||
archive: ^3.0.0
|
||||
archive: ^3.3.8
|
||||
flutter:
|
||||
sdk: flutter
|
||||
http: ^1.0.0
|
||||
path: ^1.8.0
|
||||
vector_math: ^2.1.0
|
||||
|
||||
@ -23,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 |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 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 |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |