Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
a2e40ecd08 | |||
5a725a064e | |||
8302c4b7e6 | |||
029cee4f0a | |||
eeda2f4de4 | |||
ba039e9423 | |||
3c58936d36 | |||
d0fed17a70 | |||
1c113d961a | |||
17449658bb | |||
e258c610f5 | |||
945285175a | |||
cfb29485b0 | |||
31ab666099 |
5
.github/workflows/analyze-and-test.yaml
vendored
@ -8,15 +8,12 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
analyze_and_test:
|
analyze_and_test:
|
||||||
name: Flutter analyze
|
name: Flutter analyze
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
flutter: ['stable']
|
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: ${{ matrix.flutter }}
|
channel: 'stable'
|
||||||
- run: flutter doctor
|
- run: flutter doctor
|
||||||
- run: flutter --version
|
- run: flutter --version
|
||||||
- run: flutter pub get
|
- 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-13
|
||||||
|
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 }}
|
14
CHANGELOG.md
@ -1,3 +1,17 @@
|
|||||||
|
## 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
|
## 3.0.0
|
||||||
- Add `renderCache` parameter.
|
- 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_js_rounded_ints: true
|
||||||
avoid_positional_boolean_parameters: true
|
avoid_positional_boolean_parameters: true
|
||||||
avoid_redundant_argument_values: true
|
avoid_redundant_argument_values: true
|
||||||
avoid_returning_null_for_future: true
|
|
||||||
avoid_setters_without_getters: true
|
avoid_setters_without_getters: true
|
||||||
avoid_type_to_string: true
|
avoid_type_to_string: true
|
||||||
avoid_unused_constructor_parameters: 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>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
<string>11.0</string>
|
<string>12.0</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Uncomment this line to define a global platform for your project
|
# 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.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
@ -15,9 +15,9 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
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 */ = {
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1430;
|
LastUpgradeCheck = 1510;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
@ -351,7 +351,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
@ -366,8 +366,10 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = TC6K7794M3;
|
DEVELOPMENT_TEAM = PS45A9TPZ7;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -382,8 +384,9 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.xvrh.lottie.example;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
@ -437,7 +440,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
@ -486,7 +489,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
@ -502,8 +505,10 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = TC6K7794M3;
|
DEVELOPMENT_TEAM = PS45A9TPZ7;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -518,8 +523,9 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.xvrh.lottie.example;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -533,8 +539,10 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = TC6K7794M3;
|
DEVELOPMENT_TEAM = PS45A9TPZ7;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -549,8 +557,9 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.xvrh.lottie.example;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1430"
|
LastUpgradeVersion = "1510"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
@ -16,8 +16,8 @@ EXTERNAL SOURCES:
|
|||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||||
|
|
||||||
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
|
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
|
||||||
|
|
||||||
COCOAPODS: 1.14.2
|
COCOAPODS: 1.15.2
|
||||||
|
@ -203,7 +203,7 @@
|
|||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastSwiftUpdateCheck = 0920;
|
LastSwiftUpdateCheck = 0920;
|
||||||
LastUpgradeCheck = 1430;
|
LastUpgradeCheck = 1510;
|
||||||
ORGANIZATIONNAME = "The Flutter Authors";
|
ORGANIZATIONNAME = "The Flutter Authors";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
33CC10EC2044A3C60003C045 = {
|
33CC10EC2044A3C60003C045 = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1430"
|
LastUpgradeVersion = "1510"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
@ -5,10 +5,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: archive
|
name: archive
|
||||||
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
|
sha256: ecf4273855368121b1caed0d10d4513c7241dfc813f7d3c8933b36622ae9b265
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.4.10"
|
version: "3.5.1"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -77,10 +77,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: ffi
|
name: ffi
|
||||||
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
|
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.2"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -98,31 +98,23 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
|
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "4.0.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
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:
|
http:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: http
|
name: http
|
||||||
sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139
|
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.2.1"
|
||||||
http_parser:
|
http_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -131,22 +123,38 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.2"
|
version: "4.0.2"
|
||||||
js:
|
leak_tracker:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: js
|
name: leak_tracker
|
||||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.7"
|
version: "10.0.4"
|
||||||
|
leak_tracker_flutter_testing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: leak_tracker_flutter_testing
|
||||||
|
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.3"
|
||||||
|
leak_tracker_testing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: leak_tracker_testing
|
||||||
|
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.1"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "4.0.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -161,63 +169,71 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "3.0.0"
|
version: "3.1.2"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.16"
|
version: "0.12.16+1"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.0"
|
version: "0.8.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.12.0"
|
||||||
|
mime:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: mime
|
||||||
|
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.5"
|
||||||
path:
|
path:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.3"
|
version: "1.9.0"
|
||||||
path_provider:
|
path_provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path_provider
|
name: path_provider
|
||||||
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
|
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
path_provider_android:
|
path_provider_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_android
|
name: path_provider_android
|
||||||
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
|
sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.2"
|
version: "2.2.4"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_foundation
|
name: path_provider_foundation
|
||||||
sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d"
|
sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.1"
|
version: "2.4.0"
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -258,14 +274,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.8"
|
version: "2.1.8"
|
||||||
pointycastle:
|
shelf:
|
||||||
dependency: transitive
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: pointycastle
|
name: shelf
|
||||||
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.7.3"
|
version: "1.4.1"
|
||||||
|
shelf_static:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: shelf_static
|
||||||
|
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.2"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -315,10 +339,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.1"
|
version: "0.7.0"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -335,22 +359,30 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.4"
|
||||||
|
vm_service:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vm_service
|
||||||
|
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "14.2.1"
|
||||||
web:
|
web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: web
|
name: web
|
||||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.5.1"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: win32
|
name: win32
|
||||||
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
|
sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.2.0"
|
version: "5.5.1"
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -360,5 +392,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.2.0 <4.0.0"
|
dart: ">=3.4.0 <4.0.0"
|
||||||
flutter: ">=3.16.0"
|
flutter: ">=3.18.0-18.0.pre.54"
|
||||||
|
@ -23,7 +23,8 @@ dev_dependencies:
|
|||||||
flutter_lints:
|
flutter_lints:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
golden_toolkit:
|
shelf:
|
||||||
|
shelf_static:
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# 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');
|
||||||
|
}
|
@ -7,16 +7,18 @@ class IntegerKeyframeAnimation extends KeyframeAnimation<int> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
int getValue(Keyframe<int> keyframe, double keyframeProgress) {
|
int getValue(Keyframe<int> keyframe, double keyframeProgress) {
|
||||||
if (keyframe.startValue == null || keyframe.endValue == null) {
|
if (keyframe.startValue == null) {
|
||||||
throw Exception('Missing values for keyframe.');
|
throw Exception('Missing values for keyframe.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var endValue = keyframe.endValue ?? keyframe.startValue;
|
||||||
|
|
||||||
if (valueCallback != null) {
|
if (valueCallback != null) {
|
||||||
var value = valueCallback!.getValueInternal(
|
var value = valueCallback!.getValueInternal(
|
||||||
keyframe.startFrame,
|
keyframe.startFrame,
|
||||||
keyframe.endFrame,
|
keyframe.endFrame,
|
||||||
keyframe.startValue,
|
keyframe.startValue,
|
||||||
keyframe.endValue,
|
endValue,
|
||||||
keyframeProgress,
|
keyframeProgress,
|
||||||
getLinearCurrentKeyframeProgress(),
|
getLinearCurrentKeyframeProgress(),
|
||||||
progress);
|
progress);
|
||||||
@ -25,7 +27,6 @@ class IntegerKeyframeAnimation extends KeyframeAnimation<int> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return lerpDouble(keyframe.startValue, keyframe.endValue, keyframeProgress)!
|
return lerpDouble(keyframe.startValue, endValue, keyframeProgress)!.round();
|
||||||
.round();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,8 @@ class LottieComposition {
|
|||||||
fps ??= frameRate.framesPerSecond;
|
fps ??= frameRate.framesPerSecond;
|
||||||
assert(!fps.isNaN && fps.isFinite && !fps.isNegative);
|
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 frameIndex = (totalFrameCount * progress).toInt();
|
||||||
var roundedProgress = frameIndex / totalFrameCount;
|
var roundedProgress = frameIndex / totalFrameCount;
|
||||||
assert(roundedProgress >= 0 && roundedProgress <= 1,
|
assert(roundedProgress >= 0 && roundedProgress <= 1,
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
import 'dart:io' as io;
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
import '../lottie.dart';
|
import '../lottie.dart';
|
||||||
import 'composition.dart';
|
import 'composition.dart';
|
||||||
import 'l.dart';
|
import 'l.dart';
|
||||||
@ -95,7 +97,7 @@ class Lottie extends StatefulWidget {
|
|||||||
|
|
||||||
/// Creates a widget that displays an [LottieComposition] obtained from a [File].
|
/// Creates a widget that displays an [LottieComposition] obtained from a [File].
|
||||||
static LottieBuilder file(
|
static LottieBuilder file(
|
||||||
Object /*io.File|html.File*/ file, {
|
io.File file, {
|
||||||
Animation<double>? controller,
|
Animation<double>? controller,
|
||||||
FrameRate? frameRate,
|
FrameRate? frameRate,
|
||||||
bool? animate,
|
bool? animate,
|
||||||
@ -200,6 +202,8 @@ class Lottie extends StatefulWidget {
|
|||||||
/// Creates a widget that displays an [LottieComposition] obtained from the network.
|
/// Creates a widget that displays an [LottieComposition] obtained from the network.
|
||||||
static LottieBuilder network(
|
static LottieBuilder network(
|
||||||
String url, {
|
String url, {
|
||||||
|
http.Client? client,
|
||||||
|
Map<String, String>? headers,
|
||||||
Animation<double>? controller,
|
Animation<double>? controller,
|
||||||
FrameRate? frameRate,
|
FrameRate? frameRate,
|
||||||
bool? animate,
|
bool? animate,
|
||||||
@ -225,6 +229,8 @@ class Lottie extends StatefulWidget {
|
|||||||
}) =>
|
}) =>
|
||||||
LottieBuilder.network(
|
LottieBuilder.network(
|
||||||
url,
|
url,
|
||||||
|
client: client,
|
||||||
|
headers: headers,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
frameRate: frameRate,
|
frameRate: frameRate,
|
||||||
animate: animate,
|
animate: animate,
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:io' as io;
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
import 'composition.dart';
|
import 'composition.dart';
|
||||||
import 'frame_rate.dart';
|
import 'frame_rate.dart';
|
||||||
import 'lottie.dart';
|
import 'lottie.dart';
|
||||||
@ -67,6 +69,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
/// Creates a widget that displays an [LottieComposition] obtained from the network.
|
/// Creates a widget that displays an [LottieComposition] obtained from the network.
|
||||||
LottieBuilder.network(
|
LottieBuilder.network(
|
||||||
String src, {
|
String src, {
|
||||||
|
http.Client? client,
|
||||||
Map<String, String>? headers,
|
Map<String, String>? headers,
|
||||||
this.controller,
|
this.controller,
|
||||||
this.frameRate,
|
this.frameRate,
|
||||||
@ -91,6 +94,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.renderCache,
|
this.renderCache,
|
||||||
bool? backgroundLoading,
|
bool? backgroundLoading,
|
||||||
}) : lottie = NetworkLottie(src,
|
}) : lottie = NetworkLottie(src,
|
||||||
|
client: client,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
imageProviderFactory: imageProviderFactory,
|
imageProviderFactory: imageProviderFactory,
|
||||||
decoder: decoder,
|
decoder: decoder,
|
||||||
@ -107,7 +111,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
/// `android.permission.READ_EXTERNAL_STORAGE` permission.
|
/// `android.permission.READ_EXTERNAL_STORAGE` permission.
|
||||||
///
|
///
|
||||||
LottieBuilder.file(
|
LottieBuilder.file(
|
||||||
Object /*io.File|html.File*/ file, {
|
io.File file, {
|
||||||
this.controller,
|
this.controller,
|
||||||
this.frameRate,
|
this.frameRate,
|
||||||
this.animate,
|
this.animate,
|
||||||
|
@ -2,54 +2,54 @@ import 'dart:ui';
|
|||||||
import 'value/drop_shadow.dart';
|
import 'value/drop_shadow.dart';
|
||||||
|
|
||||||
/// Property values are the same type as the generic type of their corresponding
|
/// 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.
|
/// of the callbacks.
|
||||||
///
|
///
|
||||||
/// Supported properties:
|
/// Supported properties:
|
||||||
/// Transform:
|
/// Transform:
|
||||||
/// {@link #TRANSFORM_ANCHOR_POINT}
|
/// {TRANSFORM_ANCHOR_POINT}
|
||||||
/// {@link #TRANSFORM_POSITION}
|
/// {TRANSFORM_POSITION}
|
||||||
/// {@link #TRANSFORM_OPACITY}
|
/// {TRANSFORM_OPACITY}
|
||||||
/// {@link #TRANSFORM_SCALE}
|
/// {TRANSFORM_SCALE}
|
||||||
/// {@link #TRANSFORM_ROTATION}
|
/// {TRANSFORM_ROTATION}
|
||||||
/// {@link #TRANSFORM_SKEW}
|
/// {TRANSFORM_SKEW}
|
||||||
/// {@link #TRANSFORM_SKEW_ANGLE}
|
/// {TRANSFORM_SKEW_ANGLE}
|
||||||
///
|
///
|
||||||
/// Fill:
|
/// Fill:
|
||||||
/// {@link #COLOR} (non-gradient)
|
/// {#COLOR} (non-gradient)
|
||||||
/// {@link #OPACITY}
|
/// {#OPACITY}
|
||||||
/// {@link #COLOR_FILTER}
|
/// {#COLOR_FILTER}
|
||||||
///
|
///
|
||||||
/// Stroke:
|
/// Stroke:
|
||||||
/// {@link #COLOR} (non-gradient)
|
/// {#COLOR} (non-gradient)
|
||||||
/// {@link #STROKE_WIDTH}
|
/// {#STROKE_WIDTH}
|
||||||
/// {@link #OPACITY}
|
/// {#OPACITY}
|
||||||
/// {@link #COLOR_FILTER}
|
/// {#COLOR_FILTER}
|
||||||
///
|
///
|
||||||
/// Ellipse:
|
/// Ellipse:
|
||||||
/// {@link #POSITION}
|
/// {#POSITION}
|
||||||
/// {@link #ELLIPSE_SIZE}
|
/// {#ELLIPSE_SIZE}
|
||||||
///
|
///
|
||||||
/// Polystar:
|
/// Polystar:
|
||||||
/// {@link #POLYSTAR_POINTS}
|
/// {#POLYSTAR_POINTS}
|
||||||
/// {@link #POLYSTAR_ROTATION}
|
/// {#POLYSTAR_ROTATION}
|
||||||
/// {@link #POSITION}
|
/// {#POSITION}
|
||||||
/// {@link #POLYSTAR_INNER_RADIUS} (star)
|
/// {#POLYSTAR_INNER_RADIUS} (star)
|
||||||
/// {@link #POLYSTAR_OUTER_RADIUS}
|
/// {#POLYSTAR_OUTER_RADIUS}
|
||||||
/// {@link #POLYSTAR_INNER_ROUNDEDNESS} (star)
|
/// {#POLYSTAR_INNER_ROUNDEDNESS} (star)
|
||||||
/// {@link #POLYSTAR_OUTER_ROUNDEDNESS}
|
/// {#POLYSTAR_OUTER_ROUNDEDNESS}
|
||||||
///
|
///
|
||||||
/// Repeater:
|
/// Repeater:
|
||||||
/// All transform properties
|
/// All transform properties
|
||||||
/// {@link #REPEATER_COPIES}
|
/// {#REPEATER_COPIES}
|
||||||
/// {@link #REPEATER_OFFSET}
|
/// {#REPEATER_OFFSET}
|
||||||
/// {@link #TRANSFORM_ROTATION}
|
/// {#TRANSFORM_ROTATION}
|
||||||
/// {@link #TRANSFORM_START_OPACITY}
|
/// {#TRANSFORM_START_OPACITY}
|
||||||
/// {@link #TRANSFORM_END_OPACITY}
|
/// {#TRANSFORM_END_OPACITY}
|
||||||
///
|
///
|
||||||
/// Layers:
|
/// Layers:
|
||||||
/// All transform properties
|
/// All transform properties
|
||||||
/// {@link #TIME_REMAP} (composition layers only)
|
/// {#TIME_REMAP} (composition layers only)
|
||||||
abstract class LottieProperty {
|
abstract class LottieProperty {
|
||||||
/// ColorInt **/
|
/// ColorInt **/
|
||||||
static const Color color = Color(0x00000001);
|
static const Color color = Color(0x00000001);
|
||||||
|
@ -228,9 +228,9 @@ class LayerParser {
|
|||||||
case 15:
|
case 15:
|
||||||
startFrame = reader.nextDouble();
|
startFrame = reader.nextDouble();
|
||||||
case 16:
|
case 16:
|
||||||
preCompWidth = reader.nextInt();
|
preCompWidth = reader.nextDouble().toInt();
|
||||||
case 17:
|
case 17:
|
||||||
preCompHeight = reader.nextInt();
|
preCompHeight = reader.nextDouble().toInt();
|
||||||
case 18:
|
case 18:
|
||||||
inFrame = reader.nextDouble();
|
inFrame = reader.nextDouble();
|
||||||
case 19:
|
case 19:
|
||||||
|
@ -33,9 +33,9 @@ class LottieCompositionParser {
|
|||||||
while (reader.hasNext()) {
|
while (reader.hasNext()) {
|
||||||
switch (reader.selectName(_names)) {
|
switch (reader.selectName(_names)) {
|
||||||
case 0:
|
case 0:
|
||||||
parameters.bounds.width = reader.nextInt();
|
parameters.bounds.width = reader.nextDouble().toInt();
|
||||||
case 1:
|
case 1:
|
||||||
parameters.bounds.height = reader.nextInt();
|
parameters.bounds.height = reader.nextDouble().toInt();
|
||||||
case 2:
|
case 2:
|
||||||
parameters.startFrame = reader.nextDouble();
|
parameters.startFrame = reader.nextDouble();
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -66,7 +66,7 @@ class Buffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Reads and discards {@code byteCount} bytes from this source. Throws an
|
/// 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.
|
/// requested bytes can be skipped.
|
||||||
void skip(int byteCount) {
|
void skip(int byteCount) {
|
||||||
_start += byteCount;
|
_start += byteCount;
|
||||||
|
@ -857,7 +857,7 @@ class JsonUtf8Reader extends JsonReader {
|
|||||||
|
|
||||||
/// Returns the next character in the stream that is neither whitespace nor a
|
/// 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
|
/// part of a comment. When this returns, the returned character is always at
|
||||||
/// {@code buffer.getByte(0)}.
|
/// {buffer.getByte(0)}.
|
||||||
int _nextNonWhitespace(bool throwOnEof) {
|
int _nextNonWhitespace(bool throwOnEof) {
|
||||||
// This code uses ugly local variables 'p' and 'l' representing the 'pos'
|
// This code uses ugly local variables 'p' and 'l' representing the 'pos'
|
||||||
// and 'limit' fields respectively. Using locals rather than fields saves
|
// and 'limit' fields respectively. Using locals rather than fields saves
|
||||||
|
@ -74,7 +74,7 @@ class AssetLottie extends LottieProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) {
|
bool operator ==(Object other) {
|
||||||
if (other.runtimeType != runtimeType) return false;
|
if (other.runtimeType != runtimeType) return false;
|
||||||
return other is AssetLottie &&
|
return other is AssetLottie &&
|
||||||
other.keyName == keyName &&
|
other.keyName == keyName &&
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
import 'dart:io' as io;
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:path/path.dart' as p;
|
||||||
import '../composition.dart';
|
import '../composition.dart';
|
||||||
import '../lottie_image_asset.dart';
|
import '../lottie_image_asset.dart';
|
||||||
import 'load_fonts.dart';
|
import 'load_fonts.dart';
|
||||||
import 'load_image.dart';
|
import 'load_image.dart';
|
||||||
import 'lottie_provider.dart';
|
import 'lottie_provider.dart';
|
||||||
import 'provider_io.dart' if (dart.library.html) 'provider_web.dart' as io;
|
|
||||||
|
|
||||||
@immutable
|
@immutable
|
||||||
class FileLottie extends LottieProvider {
|
class FileLottie extends LottieProvider {
|
||||||
@ -15,9 +16,13 @@ class FileLottie extends LottieProvider {
|
|||||||
super.imageProviderFactory,
|
super.imageProviderFactory,
|
||||||
super.decoder,
|
super.decoder,
|
||||||
super.backgroundLoading,
|
super.backgroundLoading,
|
||||||
});
|
}) : assert(
|
||||||
|
!kIsWeb,
|
||||||
|
'Lottie.file is not supported on Flutter Web. '
|
||||||
|
'Consider using either Lottie.asset or Lottie.network instead.',
|
||||||
|
);
|
||||||
|
|
||||||
final Object /*io.File|html.File*/ file;
|
final io.File file;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<LottieComposition> load({BuildContext? context}) {
|
Future<LottieComposition> load({BuildContext? context}) {
|
||||||
@ -25,9 +30,9 @@ class FileLottie extends LottieProvider {
|
|||||||
LottieComposition composition;
|
LottieComposition composition;
|
||||||
var args = (file, decoder);
|
var args = (file, decoder);
|
||||||
if (backgroundLoading) {
|
if (backgroundLoading) {
|
||||||
composition = await compute(loadFileAndParse, args);
|
composition = await compute(_loadFileAndParse, args);
|
||||||
} else {
|
} else {
|
||||||
composition = await loadFileAndParse(args);
|
composition = await _loadFileAndParse(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var image in composition.images.values) {
|
for (var image in composition.images.values) {
|
||||||
@ -44,26 +49,28 @@ class FileLottie extends LottieProvider {
|
|||||||
LottieComposition composition, LottieImageAsset lottieImage) {
|
LottieComposition composition, LottieImageAsset lottieImage) {
|
||||||
var imageProvider = getImageProvider(lottieImage);
|
var imageProvider = getImageProvider(lottieImage);
|
||||||
|
|
||||||
imageProvider ??= io.loadImageForFile(file, lottieImage);
|
var imagePath = p.url
|
||||||
|
.join(p.dirname(file.path), lottieImage.dirName, lottieImage.fileName);
|
||||||
|
imageProvider ??= FileImage(io.File(imagePath));
|
||||||
|
|
||||||
return loadImage(composition, lottieImage, imageProvider);
|
return loadImage(composition, lottieImage, imageProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) {
|
bool operator ==(Object other) {
|
||||||
if (other.runtimeType != runtimeType) return false;
|
if (other.runtimeType != runtimeType) return false;
|
||||||
return other is FileLottie && io.areFilesEqual(file, other.file);
|
return other is FileLottie && file.path == other.file.path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => file.hashCode;
|
int get hashCode => file.hashCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => '$runtimeType(file: ${io.filePath(file)})';
|
String toString() => '$runtimeType(file: ${file.path})';
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<LottieComposition> loadFileAndParse(
|
Future<LottieComposition> _loadFileAndParse(
|
||||||
(Object, LottieDecoder?) args) async {
|
(io.File, LottieDecoder?) args) async {
|
||||||
var bytes = await io.loadFile(args.$1);
|
var bytes = await args.$1.readAsBytes();
|
||||||
return await LottieComposition.fromBytes(bytes, decoder: args.$2);
|
return await LottieComposition.fromBytes(bytes, decoder: args.$2);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ class MemoryLottie extends LottieProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) {
|
bool operator ==(Object other) {
|
||||||
if (other.runtimeType != runtimeType) return false;
|
if (other.runtimeType != runtimeType) return false;
|
||||||
|
|
||||||
//TODO(xha): compare bytes content
|
//TODO(xha): compare bytes content
|
||||||
|
@ -2,24 +2,26 @@ import 'dart:async';
|
|||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
import '../composition.dart';
|
import '../composition.dart';
|
||||||
import '../lottie_image_asset.dart';
|
import '../lottie_image_asset.dart';
|
||||||
import 'load_fonts.dart';
|
import 'load_fonts.dart';
|
||||||
import 'load_image.dart';
|
import 'load_image.dart';
|
||||||
import 'lottie_provider.dart';
|
import 'lottie_provider.dart';
|
||||||
import 'provider_io.dart' if (dart.library.html) 'provider_web.dart' as network;
|
|
||||||
|
|
||||||
@immutable
|
@immutable
|
||||||
class NetworkLottie extends LottieProvider {
|
class NetworkLottie extends LottieProvider {
|
||||||
NetworkLottie(
|
NetworkLottie(
|
||||||
this.url, {
|
this.url, {
|
||||||
|
this.client,
|
||||||
this.headers,
|
this.headers,
|
||||||
super.imageProviderFactory,
|
super.imageProviderFactory,
|
||||||
super.decoder,
|
super.decoder,
|
||||||
super.backgroundLoading,
|
super.backgroundLoading,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
final http.Client? client;
|
||||||
final String url;
|
final String url;
|
||||||
final Map<String, String>? headers;
|
final Map<String, String>? headers;
|
||||||
|
|
||||||
@ -28,12 +30,16 @@ class NetworkLottie extends LottieProvider {
|
|||||||
return sharedLottieCache.putIfAbsent(this, () async {
|
return sharedLottieCache.putIfAbsent(this, () async {
|
||||||
var resolved = Uri.base.resolve(url);
|
var resolved = Uri.base.resolve(url);
|
||||||
|
|
||||||
|
var client = this.client ?? http.Client();
|
||||||
|
try {
|
||||||
|
var bytes = await client.readBytes(resolved, headers: headers);
|
||||||
|
|
||||||
LottieComposition composition;
|
LottieComposition composition;
|
||||||
var args = (resolved, headers, decoder);
|
|
||||||
if (backgroundLoading) {
|
if (backgroundLoading) {
|
||||||
composition = await compute(downloadAndParse, args);
|
composition = await compute(parseJsonBytes, (bytes, decoder));
|
||||||
} else {
|
} else {
|
||||||
composition = await downloadAndParse(args);
|
composition =
|
||||||
|
await LottieComposition.fromBytes(bytes, decoder: decoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var image in composition.images.values) {
|
for (var image in composition.images.values) {
|
||||||
@ -43,6 +49,11 @@ class NetworkLottie extends LottieProvider {
|
|||||||
await ensureLoadedFonts(composition);
|
await ensureLoadedFonts(composition);
|
||||||
|
|
||||||
return composition;
|
return composition;
|
||||||
|
} finally {
|
||||||
|
if (this.client == null) {
|
||||||
|
client.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +71,7 @@ class NetworkLottie extends LottieProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) {
|
bool operator ==(Object other) {
|
||||||
if (other.runtimeType != runtimeType) return false;
|
if (other.runtimeType != runtimeType) return false;
|
||||||
return other is NetworkLottie &&
|
return other is NetworkLottie &&
|
||||||
other.url == url &&
|
other.url == url &&
|
||||||
@ -73,9 +84,3 @@ class NetworkLottie extends LottieProvider {
|
|||||||
@override
|
@override
|
||||||
String toString() => '$runtimeType(url: $url)';
|
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.
|
/// it to the accumulator list.
|
||||||
///
|
///
|
||||||
/// Any {@link KeyPathElementContent} should call through to this as its implementation of
|
/// 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(
|
static void resolveKeyPath(
|
||||||
KeyPath keyPath,
|
KeyPath keyPath,
|
||||||
int depth,
|
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.
|
/// to multiple contents. In that case, the callbacks's value will apply to all of them.
|
||||||
/// <p>
|
/// <p>
|
||||||
/// Internally, this will check if the {@link KeyPath} has already been resolved with
|
/// 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) {
|
void addValueCallback(LottieDrawable drawable) {
|
||||||
var invalidate = false;
|
var invalidate = false;
|
||||||
if (valueDelegate.keyPath.isEmpty) {
|
if (valueDelegate.keyPath.isEmpty) {
|
||||||
|
114
pubspec.lock
@ -5,34 +5,34 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
|
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "64.0.0"
|
version: "67.0.0"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
|
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.2.0"
|
version: "6.4.1"
|
||||||
archive:
|
archive:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: archive
|
name: archive
|
||||||
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
|
sha256: ecf4273855368121b1caed0d10d4513c7241dfc813f7d3c8933b36622ae9b265
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.4.10"
|
version: "3.5.1"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: args
|
name: args
|
||||||
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.2"
|
version: "2.5.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -93,10 +93,10 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368"
|
sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.4"
|
version: "2.3.6"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -122,10 +122,10 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
|
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "4.0.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -139,46 +139,78 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.2"
|
||||||
js:
|
http:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: js
|
name: http
|
||||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.7"
|
version: "1.2.1"
|
||||||
|
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: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "10.0.4"
|
||||||
|
leak_tracker_flutter_testing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: leak_tracker_flutter_testing
|
||||||
|
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.3"
|
||||||
|
leak_tracker_testing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: leak_tracker_testing
|
||||||
|
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.1"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "4.0.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.16"
|
version: "0.12.16+1"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.0"
|
version: "0.8.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.12.0"
|
||||||
package_config:
|
package_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -191,18 +223,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.3"
|
version: "1.9.0"
|
||||||
pointycastle:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: pointycastle
|
|
||||||
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.7.3"
|
|
||||||
pub_semver:
|
pub_semver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -260,10 +284,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.1"
|
version: "0.7.0"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -280,6 +304,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.4"
|
||||||
|
vm_service:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vm_service
|
||||||
|
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "14.2.1"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -292,10 +324,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: web
|
name: web
|
||||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.5.1"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@ -305,5 +337,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.2.0 <4.0.0"
|
dart: ">=3.3.0 <4.0.0"
|
||||||
flutter: ">=3.16.0"
|
flutter: ">=3.18.0-18.0.pre.54"
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
name: lottie
|
name: lottie
|
||||||
description: Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
|
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.1.3
|
||||||
repository: https://github.com/xvrh/lottie-flutter
|
repository: https://github.com/xvrh/lottie-flutter
|
||||||
|
|
||||||
funding:
|
funding:
|
||||||
- https://www.buymeacoffee.com/xvrh
|
- https://www.buymeacoffee.com/xvrh
|
||||||
|
- https://github.com/sponsors/xvrh
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '^3.2.0'
|
sdk: '^3.2.0'
|
||||||
flutter: '>=3.16.0'
|
flutter: '>=3.16.0'
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
archive: ^3.0.0
|
archive: ^3.3.8
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
http: ^1.0.0
|
||||||
path: ^1.8.0
|
path: ^1.8.0
|
||||||
vector_math: ^2.1.0
|
vector_math: ^2.1.0
|
||||||
|
|
||||||
|
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: 132 KiB After Width: | Height: | Size: 130 KiB |
BIN
test/goldens/all/Tests/kona_splash_animation.png
Normal file
After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.5 KiB |
BIN
test/goldens/all/Tests/missingendvalue.png
Normal file
After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@ -471,6 +471,19 @@ void main() {
|
|||||||
find.byWidgetPredicate((w) => w is RawLottie && w.composition != null),
|
find.byWidgetPredicate((w) => w is RawLottie && w.composition != null),
|
||||||
findsOneWidget);
|
findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWidgets('expected an int', (tester) async {
|
||||||
|
var data = File('example/assets/Tests/kona_splash_animation.json')
|
||||||
|
.readAsBytesSync();
|
||||||
|
var composition = await LottieComposition.fromBytes(data);
|
||||||
|
|
||||||
|
await tester.pumpWidget(Lottie(
|
||||||
|
composition: composition,
|
||||||
|
animate: false,
|
||||||
|
));
|
||||||
|
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
class SynchronousFile extends Fake implements File {
|
class SynchronousFile extends Fake implements File {
|
||||||
|