mirror of
https://github.com/xvrh/lottie-flutter.git
synced 2025-08-06 16:39:36 +08:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
434ae88aa8 | |||
6b752d829c | |||
124ba6997b | |||
fdc4018f57 | |||
b61ea14116 | |||
9c266bb98b | |||
cd4cc910c4 | |||
92502f1358 | |||
4520221a28 | |||
3f5422d44b | |||
61668b0509 | |||
1e9861e43f | |||
c32550cf15 | |||
9d4e66ea6b | |||
f58f3888da | |||
dc43a532b0 | |||
1b752bf341 | |||
21f34e6334 | |||
8dcb052fe1 | |||
a333a42f01 | |||
8ce429cdf4 | |||
fc450a88f4 |
2
.github/workflows/analyze-and-test.yaml
vendored
2
.github/workflows/analyze-and-test.yaml
vendored
@ -34,7 +34,7 @@ jobs:
|
|||||||
&& exit 1)
|
&& exit 1)
|
||||||
shell: bash
|
shell: bash
|
||||||
build_web_version:
|
build_web_version:
|
||||||
name: Check that the web version compile
|
name: Check that the web version can compile
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
2
.github/workflows/publish-on-pub.yaml
vendored
2
.github/workflows/publish-on-pub.yaml
vendored
@ -12,8 +12,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- run: flutter pub run tool/publish/comment_dependency_overrides.dart
|
|
||||||
- run: flutter pub get
|
|
||||||
- run: flutter pub run tool/publish/check_version.dart ${GITHUB_REF}
|
- run: flutter pub run tool/publish/check_version.dart ${GITHUB_REF}
|
||||||
- name: Setup credentials
|
- name: Setup credentials
|
||||||
run: |
|
run: |
|
||||||
|
135
CHANGELOG.md
135
CHANGELOG.md
@ -1,13 +1,76 @@
|
|||||||
## [1.4.2]
|
## 2.4.0
|
||||||
|
- Require minimum Dart 3.0.0 and Flutter 3.10.0
|
||||||
|
- Fix a parsing bug when the name property in RoundedCorner was null
|
||||||
|
|
||||||
|
## 2.3.2
|
||||||
|
- Fix a bug when running on the web due to [bitwise operations difference](https://dart.dev/guides/language/numbers#bitwise-operations).
|
||||||
|
|
||||||
|
## 2.3.1
|
||||||
|
- Fix an assertion for null `ShapeTrimPathType.type`.
|
||||||
|
|
||||||
|
## 2.3.0
|
||||||
|
- Fixed a failed assertion (`dirty: is not true`) when calling `setState` inside `onLoaded` callback.
|
||||||
|
- Update point text y offset
|
||||||
|
- Makes static compositions not animate by default
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
Apply the latest fixes from Lottie-Android:
|
||||||
|
|
||||||
|
- Overhaul text layout
|
||||||
|
- Fix rounded corners modifying already rounded corners
|
||||||
|
- Support box position in Document Data
|
||||||
|
- Allow interpolating between gradients with different opacity stops
|
||||||
|
- Add support for gradient opacity stops
|
||||||
|
|
||||||
|
## 2.1.0
|
||||||
|
- Improve the cache to ensure that there is not an empty frame each time we load an animation.
|
||||||
|
The method `AssetLottie('anim.json').load()` returns a `SynchronousFuture` if it has been loaded previously.
|
||||||
|
- Expose the `LottieCache` singleton.
|
||||||
|
It allows to change the cache behaviour and clear the entries.
|
||||||
|
|
||||||
|
```dart
|
||||||
|
void main() {
|
||||||
|
Lottie.cache.maximumSize = 10;
|
||||||
|
Lottie.cache.clear();
|
||||||
|
Lottie.cache.evict(NetworkLottie('https://lottie.com/anim.json'));
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2.0.0
|
||||||
|
- **Breaking change**: the lottie widget will be smaller if it relies on the intrinsic size of the composition.
|
||||||
|
|
||||||
|
Previously the lottie parser was automatically multiplying the size of the composition by `window.devicePixelRatio`.
|
||||||
|
This was incorrect as it results in a widget of a different size depending on the pixel ratio of the monitor.
|
||||||
|
Furthermore, it created some bugs when the property `window.devicePixelRatio` was not available immediately at the start
|
||||||
|
of the app (on Android release builds).
|
||||||
|
|
||||||
|
The code can be adapted to specify explicitly the size of the animation with `width`, `height` and `fit` properties.
|
||||||
|
|
||||||
|
```dart
|
||||||
|
Scaffold(
|
||||||
|
body: Center(
|
||||||
|
child: Lottie.asset(
|
||||||
|
'assets/LottieLogo1.json',
|
||||||
|
height: 800,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
## 1.4.3
|
||||||
|
- Fixed some lints with Flutter 3.3.
|
||||||
|
|
||||||
|
## 1.4.2
|
||||||
- Use `FilterQuality.low` as default to draw image layers.
|
- Use `FilterQuality.low` as default to draw image layers.
|
||||||
|
|
||||||
## [1.4.1]
|
## 1.4.1
|
||||||
- Allow `AlignmentGeometry` for `alignment`.
|
- Allow `AlignmentGeometry` for `alignment`.
|
||||||
|
|
||||||
## [1.4.0]
|
## 1.4.0
|
||||||
- Added `filterQuality` property to control the performance vs quality trade-off to use when drawing images
|
- Added `filterQuality` property to control the performance vs quality trade-off to use when drawing images
|
||||||
|
|
||||||
## [1.3.0]
|
## 1.3.0
|
||||||
- Added support for rounded corners on shapes and rects
|
- Added support for rounded corners on shapes and rects
|
||||||
- Add support for text in dynamic properties (`ValueDelegate`)
|
- Add support for text in dynamic properties (`ValueDelegate`)
|
||||||
|
|
||||||
@ -29,13 +92,13 @@ Lottie.asset(
|
|||||||
- Add support for reversed polystar paths
|
- Add support for reversed polystar paths
|
||||||
- Enforce order of operations to avoid rounding errors
|
- Enforce order of operations to avoid rounding errors
|
||||||
|
|
||||||
## [1.2.2]
|
## 1.2.2
|
||||||
- Internal maintenance: fix lints for Flutter 2.10
|
- Internal maintenance: fix lints for Flutter 2.10
|
||||||
|
|
||||||
## [1.2.1]
|
## 1.2.1
|
||||||
- Fix: Revert Cubic to `PathInterpolator.cubic`
|
- Fix: Revert Cubic to `PathInterpolator.cubic`
|
||||||
|
|
||||||
## [1.2.0]
|
## 1.2.0
|
||||||
- Add support for gaussian blurs.
|
- Add support for gaussian blurs.
|
||||||
|
|
||||||
Example to blur some elements dynamically:
|
Example to blur some elements dynamically:
|
||||||
@ -72,7 +135,7 @@ Lottie.asset(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
## [1.1.0]
|
## 1.1.0
|
||||||
- Add `errorBuilder` callback to provide an alternative widget in case an error occurs during loading.
|
- Add `errorBuilder` callback to provide an alternative widget in case an error occurs during loading.
|
||||||
```dart
|
```dart
|
||||||
Lottie.network(
|
Lottie.network(
|
||||||
@ -94,25 +157,25 @@ Lottie.network(
|
|||||||
```
|
```
|
||||||
- Various bug fixes
|
- Various bug fixes
|
||||||
|
|
||||||
## [1.0.1]
|
## 1.0.1
|
||||||
- Implement `RenderBox.computeDryLayout`
|
- Implement `RenderBox.computeDryLayout`
|
||||||
|
|
||||||
## [1.0.0]
|
## 1.0.0
|
||||||
- Migrate to null safety
|
- Migrate to null safety
|
||||||
- Fix some rendering bugs
|
- Fix some rendering bugs
|
||||||
- Add an image delegate to dynamically change images
|
- Add an image delegate to dynamically change images
|
||||||
- Allow to use an imageProviderFactory with a zip file
|
- Allow to use an imageProviderFactory with a zip file
|
||||||
|
|
||||||
## [0.7.1]
|
## 0.7.1
|
||||||
- Fix a crash for some lottie file with empty paths.
|
- Fix a crash for some lottie file with empty paths.
|
||||||
|
|
||||||
## [0.7.0+1]
|
## 0.7.0+1
|
||||||
- Fix Flutter Web compilation error
|
- Fix Flutter Web compilation error
|
||||||
|
|
||||||
## [0.7.0]
|
## 0.7.0
|
||||||
- Performance improvement for complex animations.
|
- Performance improvement for complex animations.
|
||||||
|
|
||||||
## [0.6.0]
|
## 0.6.0
|
||||||
- Runs the animation at the frame rate specified in the json file (ie. An animation encoded with a 20 FPS will only
|
- Runs the animation at the frame rate specified in the json file (ie. An animation encoded with a 20 FPS will only
|
||||||
be paint 20 times per seconds even though the AnimationController will invalidate the widget 60 times per seconds).
|
be paint 20 times per seconds even though the AnimationController will invalidate the widget 60 times per seconds).
|
||||||
A new property `frameRate` allows to opt-out this behavior and have the widget to repaint at the device frame rate
|
A new property `frameRate` allows to opt-out this behavior and have the widget to repaint at the device frame rate
|
||||||
@ -123,20 +186,20 @@ Lottie.network(
|
|||||||
- Fix a bug where we would call `markNeedPaint` when the animation was not changing. This removes unnecessary paints in
|
- Fix a bug where we would call `markNeedPaint` when the animation was not changing. This removes unnecessary paints in
|
||||||
animations with static periods.
|
animations with static periods.
|
||||||
|
|
||||||
## [0.5.1]
|
## 0.5.1
|
||||||
- Remove direct dependencies on dart:io to support Flutter Web
|
- Remove direct dependencies on dart:io to support Flutter Web
|
||||||
|
|
||||||
## [0.5.0]
|
## 0.5.0
|
||||||
- Support loading animation from network in a web app
|
- Support loading animation from network in a web app
|
||||||
- Fix a couple of bugs with the web dev compiler
|
- Fix a couple of bugs with the web dev compiler
|
||||||
|
|
||||||
## [0.4.1]
|
## 0.4.1
|
||||||
- Support color value stored as RGB, not RGBA
|
- Support color value stored as RGB, not RGBA
|
||||||
|
|
||||||
## [0.4.0+1]
|
## 0.4.0+1
|
||||||
- Support latest version of the `characters` package
|
- Support latest version of the `characters` package
|
||||||
|
|
||||||
## [0.4.0]
|
## 0.4.0
|
||||||
- Disable "Merge paths" by default and provide an option to enable them.
|
- Disable "Merge paths" by default and provide an option to enable them.
|
||||||
This is the same behavior as in Lottie-android.
|
This is the same behavior as in Lottie-android.
|
||||||
Merge paths currently don't work if the the operand shape is entirely contained within the
|
Merge paths currently don't work if the the operand shape is entirely contained within the
|
||||||
@ -149,62 +212,62 @@ Lottie.asset('file.json', options: LottieOptions(enableMergePaths: true));
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## [0.3.6]
|
## 0.3.6
|
||||||
- Export the `Marker` class
|
- Export the `Marker` class
|
||||||
|
|
||||||
## [0.3.5]
|
## 0.3.5
|
||||||
- Fix a bug with a wrongly clipped rectangle.
|
- Fix a bug with a wrongly clipped rectangle.
|
||||||
|
|
||||||
## [0.3.4]
|
## 0.3.4
|
||||||
- Fix a bug with dashed path
|
- Fix a bug with dashed path
|
||||||
|
|
||||||
## [0.3.3]
|
## 0.3.3
|
||||||
- Fix a bug with rounded rectangle shape
|
- Fix a bug with rounded rectangle shape
|
||||||
|
|
||||||
## [0.3.2]
|
## 0.3.2
|
||||||
- Fix a bug with "repeater" content
|
- Fix a bug with "repeater" content
|
||||||
|
|
||||||
## [0.3.1]
|
## 0.3.1
|
||||||
- Support dashed path
|
- Support dashed path
|
||||||
|
|
||||||
## [0.3.0+1]
|
## 0.3.0+1
|
||||||
- Specify a version range for the dependency on `characters`.
|
- Specify a version range for the dependency on `characters`.
|
||||||
|
|
||||||
## [0.3.0]
|
## 0.3.0
|
||||||
- Add `LottieDelegates` a group of options to customize the lottie animation at runtime.
|
- Add `LottieDelegates` a group of options to customize the lottie animation at runtime.
|
||||||
ie: Dynamically modify color, position, size, text... of every elements of the animation.
|
ie: Dynamically modify color, position, size, text... of every elements of the animation.
|
||||||
- Correctly display Linear and Radial Gradients
|
- Correctly display Linear and Radial Gradients
|
||||||
- Integrate latest changes from Lottie-android
|
- Integrate latest changes from Lottie-android
|
||||||
|
|
||||||
## [0.2.2]
|
## 0.2.2
|
||||||
- Add a [repeat] parameter to specify if the automatic animation should loop.
|
- Add a [repeat] parameter to specify if the automatic animation should loop.
|
||||||
- Add the [animate], [reverse], [repeat] properties on `LottieBuilder`
|
- Add the [animate], [reverse], [repeat] properties on `LottieBuilder`
|
||||||
- Fix bug with `onLoaded` callback when the `LottieProvider` is changed
|
- Fix bug with `onLoaded` callback when the `LottieProvider` is changed
|
||||||
|
|
||||||
## [0.2.1]
|
## 0.2.1
|
||||||
- Fix a big bug in the path transformation code. A lot more animations look correct now.
|
- Fix a big bug in the path transformation code. A lot more animations look correct now.
|
||||||
|
|
||||||
## [0.2.0+1]
|
## 0.2.0+1
|
||||||
- Improve readme
|
- Improve readme
|
||||||
- (internal) Add golden tests
|
- (internal) Add golden tests
|
||||||
|
|
||||||
## [0.2.0]
|
## 0.2.0
|
||||||
- Support loading the animation and its images from a zip file
|
- Support loading the animation and its images from a zip file
|
||||||
- Breaking: `LottieComposition.fromBytes` and `fromByteData` are now asynchronous.
|
- Breaking: `LottieComposition.fromBytes` and `fromByteData` are now asynchronous.
|
||||||
|
|
||||||
## [0.1.4]
|
## 0.1.4
|
||||||
- Support images in animation
|
- Support images in animation
|
||||||
- Basic support for text in animation (work in progress)
|
- Basic support for text in animation (work in progress)
|
||||||
|
|
||||||
## [0.1.3]
|
## 0.1.3
|
||||||
- Support Polystar shape
|
- Support Polystar shape
|
||||||
- Reorganize examples.
|
- Reorganize examples.
|
||||||
|
|
||||||
## [0.1.2]
|
## 0.1.2
|
||||||
- Implement `Lottie.network`, `Lottie.file` and `Lottie.memory`
|
- Implement `Lottie.network`, `Lottie.file` and `Lottie.memory`
|
||||||
|
|
||||||
## [0.1.1]
|
## 0.1.1
|
||||||
- Fix analysis lints
|
- Fix analysis lints
|
||||||
|
|
||||||
## [0.1.0]
|
## 0.1.0
|
||||||
- Initial conversion of [lottie-android](https://github.com/airbnb/lottie-android) to Dart/Flutter
|
- Initial conversion of [lottie-android](https://github.com/airbnb/lottie-android) to Dart/Flutter
|
||||||
|
18
README.md
18
README.md
@ -23,7 +23,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -61,7 +61,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class MyApp extends StatefulWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyApp> createState() => _MyAppState();
|
State<MyApp> createState() => _MyAppState();
|
||||||
@ -129,14 +129,13 @@ animation.
|
|||||||
The `Lottie` widget has several convenient constructors (`Lottie.asset`, `Lottie.network`, `Lottie.memory`) to load, parse and
|
The `Lottie` widget has several convenient constructors (`Lottie.asset`, `Lottie.network`, `Lottie.memory`) to load, parse and
|
||||||
cache automatically the json file.
|
cache automatically the json file.
|
||||||
|
|
||||||
Sometime you may prefer to have full control over the loading of the file. Use `LottieComposition.fromByteData` to
|
Sometime you may prefer to have full control over the loading of the file. Use `AssetLottie` (or `NetworkLottie`, `MemoryLottie`) to load a lottie composition from a json file.
|
||||||
parse the file from a list of bytes.
|
|
||||||
|
|
||||||
This example shows how to load and parse a Lottie composition from a json file.
|
This example shows how to load and parse a Lottie composition from a json file.
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
class MyWidget extends StatefulWidget {
|
class MyWidget extends StatefulWidget {
|
||||||
const MyWidget({Key? key}) : super(key: key);
|
const MyWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyWidget> createState() => _MyWidgetState();
|
State<MyWidget> createState() => _MyWidgetState();
|
||||||
@ -149,12 +148,7 @@ class _MyWidgetState extends State<MyWidget> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
_composition = _loadComposition();
|
_composition = AssetLottie('assets/LottieLogo1.json').load();
|
||||||
}
|
|
||||||
|
|
||||||
Future<LottieComposition> _loadComposition() async {
|
|
||||||
var assetData = await rootBundle.load('assets/LottieLogo1.json');
|
|
||||||
return await LottieComposition.fromByteData(assetData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -182,7 +176,7 @@ a specific position and size.
|
|||||||
class CustomDrawer extends StatelessWidget {
|
class CustomDrawer extends StatelessWidget {
|
||||||
final LottieComposition composition;
|
final LottieComposition composition;
|
||||||
|
|
||||||
const CustomDrawer(this.composition, {Key? key}) : super(key: key);
|
const CustomDrawer(this.composition, {super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -51,8 +51,7 @@ animation.
|
|||||||
The `Lottie` widget has several convenient constructors (`Lottie.asset`, `Lottie.network`, `Lottie.memory`) to load, parse and
|
The `Lottie` widget has several convenient constructors (`Lottie.asset`, `Lottie.network`, `Lottie.memory`) to load, parse and
|
||||||
cache automatically the json file.
|
cache automatically the json file.
|
||||||
|
|
||||||
Sometime you may prefer to have full control over the loading of the file. Use `LottieComposition.fromByteData` to
|
Sometime you may prefer to have full control over the loading of the file. Use `AssetLottie` (or `NetworkLottie`, `MemoryLottie`) to load a lottie composition from a json file.
|
||||||
parse the file from a list of bytes.
|
|
||||||
|
|
||||||
This example shows how to load and parse a Lottie composition from a json file.
|
This example shows how to load and parse a Lottie composition from a json file.
|
||||||
|
|
||||||
|
@ -1,29 +1,59 @@
|
|||||||
include: package:flutter_lints/flutter.yaml
|
include: package:flutter_lints/flutter.yaml
|
||||||
analyzer:
|
analyzer:
|
||||||
strong-mode:
|
language:
|
||||||
implicit-casts: false
|
strict-casts: true
|
||||||
implicit-dynamic: false
|
strict-inference: true
|
||||||
linter:
|
linter:
|
||||||
rules:
|
rules:
|
||||||
avoid_print: false
|
avoid_print: false
|
||||||
|
|
||||||
always_declare_return_types: true
|
always_declare_return_types: true
|
||||||
|
avoid_bool_literals_in_conditional_expressions: true
|
||||||
|
avoid_double_and_int_checks: true
|
||||||
avoid_dynamic_calls: true
|
avoid_dynamic_calls: true
|
||||||
|
avoid_equals_and_hash_code_on_mutable_classes: true
|
||||||
avoid_escaping_inner_quotes: true
|
avoid_escaping_inner_quotes: true
|
||||||
|
avoid_final_parameters: true
|
||||||
|
avoid_function_literals_in_foreach_calls: true
|
||||||
|
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_setters_without_getters: true
|
||||||
|
avoid_type_to_string: true
|
||||||
|
avoid_unused_constructor_parameters: true
|
||||||
|
cancel_subscriptions: true
|
||||||
cast_nullable_to_non_nullable: true
|
cast_nullable_to_non_nullable: true
|
||||||
close_sinks: true
|
close_sinks: true
|
||||||
|
collection_methods_unrelated_type: true
|
||||||
|
combinators_ordering: true
|
||||||
|
conditional_uri_does_not_exist: true
|
||||||
|
dangling_library_doc_comments: true
|
||||||
|
deprecated_consistency: true
|
||||||
|
implicit_reopen: true
|
||||||
|
invalid_case_patterns: true
|
||||||
|
leading_newlines_in_multiline_strings: true
|
||||||
|
library_annotations: true
|
||||||
no_adjacent_strings_in_list: true
|
no_adjacent_strings_in_list: true
|
||||||
no_default_cases: true
|
no_default_cases: true
|
||||||
|
noop_primitive_operations: true
|
||||||
omit_local_variable_types: true
|
omit_local_variable_types: true
|
||||||
only_throw_errors: true
|
only_throw_errors: true
|
||||||
prefer_interpolation_to_compose_strings: true
|
prefer_if_elements_to_conditional_expressions: true
|
||||||
|
prefer_relative_imports: true
|
||||||
prefer_single_quotes: true
|
prefer_single_quotes: true
|
||||||
sort_child_properties_last: true
|
sort_child_properties_last: true
|
||||||
sort_pub_dependencies: true
|
sort_pub_dependencies: true
|
||||||
test_types_in_equals: true
|
test_types_in_equals: true
|
||||||
unawaited_futures: true
|
unawaited_futures: true
|
||||||
|
unnecessary_breaks: true
|
||||||
|
unnecessary_library_directive: true
|
||||||
unnecessary_parenthesis: true
|
unnecessary_parenthesis: true
|
||||||
unnecessary_statements: true
|
unnecessary_statements: true
|
||||||
|
unnecessary_to_list_in_spreads: true
|
||||||
unsafe_html: true
|
unsafe_html: true
|
||||||
|
use_enums: true
|
||||||
|
use_if_null_to_convert_nulls_to_bools: true
|
||||||
|
use_named_constants: true
|
||||||
use_raw_strings: true
|
use_raw_strings: true
|
||||||
|
use_super_parameters: true
|
||||||
|
@ -9,7 +9,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
1
example/assets/Tests/1669133489622.json
Normal file
1
example/assets/Tests/1669133489622.json
Normal file
File diff suppressed because one or more lines are too long
1
example/assets/Tests/BeyondBounds.json
Normal file
1
example/assets/Tests/BeyondBounds.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"v":"5.8.2","fr":23.9759979248047,"ip":0,"op":71.9999937681822,"w":400,"h":400,"nm":"BeyondBounds","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[200,200,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[510.547,510.547],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":71.9999937681822,"st":0,"bm":0}],"markers":[]}
|
1
example/assets/Tests/BoxPosition.json
Normal file
1
example/assets/Tests/BoxPosition.json
Normal file
File diff suppressed because one or more lines are too long
BIN
example/assets/Tests/EmbeddedFont.zip
Normal file
BIN
example/assets/Tests/EmbeddedFont.zip
Normal file
Binary file not shown.
1
example/assets/Tests/Framerate.json
Normal file
1
example/assets/Tests/Framerate.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"v":"5.9.6","fr":3,"ip":0,"op":3,"w":200,"h":200,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[30,30,0],"to":[21.667,21.667,0],"ti":[-21.667,-21.667,0]},{"t":2,"s":[160,160,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[58.742,58.742],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":3,"st":0,"ct":1,"bm":0}],"markers":[]}
|
1
example/assets/Tests/Heart.json
Normal file
1
example/assets/Tests/Heart.json
Normal file
File diff suppressed because one or more lines are too long
1038
example/assets/Tests/InterpolateBetweenOpacityStops.json
Executable file
1038
example/assets/Tests/InterpolateBetweenOpacityStops.json
Executable file
File diff suppressed because it is too large
Load Diff
1
example/assets/Tests/LargeComposition.json
Normal file
1
example/assets/Tests/LargeComposition.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"v":"5.8.1","fr":25,"ip":0,"op":2,"w":2000,"h":4000,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1000,2000,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[1554.562,597.062],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.220496237278,1,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[1.281,-21.469],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 2","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[1780.188,3801.75],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.116727701823,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[2.094,12.875],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":2,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":1,"nm":"Red Solid 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1000,2000,0],"ix":2,"l":2},"a":{"a":0,"k":[1000,2000,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"sw":2000,"sh":4000,"sc":"#ff0000","ip":0,"op":2,"st":0,"bm":0}],"markers":[]}
|
1
example/assets/Tests/Multiline.json
Normal file
1
example/assets/Tests/Multiline.json
Normal file
File diff suppressed because one or more lines are too long
494
example/assets/Tests/OpacityStops.json
Normal file
494
example/assets/Tests/OpacityStops.json
Normal file
@ -0,0 +1,494 @@
|
|||||||
|
{
|
||||||
|
"tgs": 1,
|
||||||
|
"v": "5.5.2",
|
||||||
|
"fr": 60,
|
||||||
|
"ip": 0,
|
||||||
|
"op": 180,
|
||||||
|
"w": 512,
|
||||||
|
"h": 512,
|
||||||
|
"nm": "02_ricl_klass - 3:00",
|
||||||
|
"ddd": 0,
|
||||||
|
"assets": [],
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"ddd": 0,
|
||||||
|
"ind": 6,
|
||||||
|
"ty": 4,
|
||||||
|
"parent": 5,
|
||||||
|
"sr": 1,
|
||||||
|
"ks": {
|
||||||
|
"o": {
|
||||||
|
"a": 1,
|
||||||
|
"k": [
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": -105,
|
||||||
|
"s": [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": -104,
|
||||||
|
"s": [
|
||||||
|
100
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": 34,
|
||||||
|
"s": [
|
||||||
|
100
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": 35,
|
||||||
|
"s": [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": 75,
|
||||||
|
"s": [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": 76,
|
||||||
|
"s": [
|
||||||
|
100
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": 214,
|
||||||
|
"s": [
|
||||||
|
100
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"t": 215,
|
||||||
|
"s": [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"p": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
0,
|
||||||
|
-0.031,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"a": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
-87,
|
||||||
|
-18.182,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
50,
|
||||||
|
33,
|
||||||
|
100
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ao": 0,
|
||||||
|
"shapes": [
|
||||||
|
{
|
||||||
|
"ty": "gr",
|
||||||
|
"it": [
|
||||||
|
{
|
||||||
|
"ind": 0,
|
||||||
|
"ty": "sh",
|
||||||
|
"ks": {
|
||||||
|
"a": 1,
|
||||||
|
"k": [
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": 0.833,
|
||||||
|
"y": 0.833
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": 0.167,
|
||||||
|
"y": 0.167
|
||||||
|
},
|
||||||
|
"t": 213,
|
||||||
|
"s": [
|
||||||
|
{
|
||||||
|
"i": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"o": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"v": [
|
||||||
|
[
|
||||||
|
571.25,
|
||||||
|
-298.22
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-192.5,
|
||||||
|
-267.902
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-182.875,
|
||||||
|
510.152
|
||||||
|
],
|
||||||
|
[
|
||||||
|
575.125,
|
||||||
|
547.848
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"c": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"t": 214,
|
||||||
|
"s": [
|
||||||
|
{
|
||||||
|
"i": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"o": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"v": [
|
||||||
|
[
|
||||||
|
122.25,
|
||||||
|
-242.159
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-192.5,
|
||||||
|
-267.902
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-181.875,
|
||||||
|
178.333
|
||||||
|
],
|
||||||
|
[
|
||||||
|
175.125,
|
||||||
|
141.788
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"c": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hd": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "gf",
|
||||||
|
"o": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 100
|
||||||
|
},
|
||||||
|
"r": 1,
|
||||||
|
"bm": 0,
|
||||||
|
"g": {
|
||||||
|
"p": 5,
|
||||||
|
"k": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
0.832,
|
||||||
|
0.275,
|
||||||
|
0.89,
|
||||||
|
0.086,
|
||||||
|
|
||||||
|
0.86,
|
||||||
|
0.275,
|
||||||
|
0.89,
|
||||||
|
0.086,
|
||||||
|
|
||||||
|
0.887,
|
||||||
|
0.275,
|
||||||
|
0.89,
|
||||||
|
0.086,
|
||||||
|
|
||||||
|
0.944,
|
||||||
|
0.275,
|
||||||
|
0.89,
|
||||||
|
0.086,
|
||||||
|
|
||||||
|
1,
|
||||||
|
0.275,
|
||||||
|
0.89,
|
||||||
|
0.086,
|
||||||
|
|
||||||
|
0.65,
|
||||||
|
0,
|
||||||
|
|
||||||
|
0.785,
|
||||||
|
0.5,
|
||||||
|
|
||||||
|
0.84,
|
||||||
|
1,
|
||||||
|
|
||||||
|
0.862,
|
||||||
|
1,
|
||||||
|
|
||||||
|
0.885,
|
||||||
|
1,
|
||||||
|
|
||||||
|
0.896,
|
||||||
|
0.5,
|
||||||
|
|
||||||
|
0.908,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
457.898,
|
||||||
|
-71.143
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"e": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
-182.411,
|
||||||
|
-47.941
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": 2,
|
||||||
|
"h": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0
|
||||||
|
},
|
||||||
|
"a": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 97.679
|
||||||
|
},
|
||||||
|
"hd": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "tr",
|
||||||
|
"p": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"a": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
100,
|
||||||
|
100
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 100
|
||||||
|
},
|
||||||
|
"sk": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0
|
||||||
|
},
|
||||||
|
"sa": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bm": 0,
|
||||||
|
"hd": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ip": 0,
|
||||||
|
"op": 180,
|
||||||
|
"st": -120,
|
||||||
|
"bm": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
1
example/assets/Tests/PrecompBlurDecimapPrecompSize.json
Normal file
1
example/assets/Tests/PrecompBlurDecimapPrecompSize.json
Normal file
File diff suppressed because one or more lines are too long
386
example/assets/Tests/RoundedWithAlreadyRoundedCorners.json
Normal file
386
example/assets/Tests/RoundedWithAlreadyRoundedCorners.json
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
{
|
||||||
|
"v": "5.9.1",
|
||||||
|
"fr": 60,
|
||||||
|
"ip": 0,
|
||||||
|
"op": 56,
|
||||||
|
"w": 1080,
|
||||||
|
"h": 1080,
|
||||||
|
"nm": "Warning",
|
||||||
|
"ddd": 0,
|
||||||
|
"assets": [
|
||||||
|
{
|
||||||
|
"id": "comp_0",
|
||||||
|
"nm": "Warning_2",
|
||||||
|
"fr": 60,
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"ddd": 0,
|
||||||
|
"ind": 3,
|
||||||
|
"ty": 4,
|
||||||
|
"nm": "CERCHIO contorni",
|
||||||
|
"sr": 1,
|
||||||
|
"ks": {
|
||||||
|
"o": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 100,
|
||||||
|
"ix": 11
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0,
|
||||||
|
"ix": 10
|
||||||
|
},
|
||||||
|
"p": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
24.5,
|
||||||
|
24.5,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"ix": 2,
|
||||||
|
"l": 2
|
||||||
|
},
|
||||||
|
"a": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
29.5,
|
||||||
|
29.5,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"ix": 1,
|
||||||
|
"l": 2
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
100,
|
||||||
|
100,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"ix": 6,
|
||||||
|
"l": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ao": 0,
|
||||||
|
"shapes": [
|
||||||
|
{
|
||||||
|
"ty": "gr",
|
||||||
|
"it": [
|
||||||
|
{
|
||||||
|
"ind": 0,
|
||||||
|
"ty": "sh",
|
||||||
|
"ix": 1,
|
||||||
|
"ks": {
|
||||||
|
"a": 0,
|
||||||
|
"k": {
|
||||||
|
"i": [
|
||||||
|
[
|
||||||
|
-12.15,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
-12.15
|
||||||
|
],
|
||||||
|
[
|
||||||
|
12.15,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
12.15
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"o": [
|
||||||
|
[
|
||||||
|
12.15,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
12.15
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-12.15,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
-12.15
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"v": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
-22
|
||||||
|
],
|
||||||
|
[
|
||||||
|
22,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
22
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-22,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"c": true
|
||||||
|
},
|
||||||
|
"ix": 2
|
||||||
|
},
|
||||||
|
"nm": "Tracciato 1",
|
||||||
|
"mn": "ADBE Vector Shape - Group",
|
||||||
|
"hd": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "st",
|
||||||
|
"c": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
0.956862804936,
|
||||||
|
0.290196078431,
|
||||||
|
0.239215701234,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"ix": 3
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 100,
|
||||||
|
"ix": 4
|
||||||
|
},
|
||||||
|
"w": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 3,
|
||||||
|
"ix": 5
|
||||||
|
},
|
||||||
|
"lc": 2,
|
||||||
|
"lj": 2,
|
||||||
|
"bm": 0,
|
||||||
|
"nm": "Traccia 1",
|
||||||
|
"mn": "ADBE Vector Graphic - Stroke",
|
||||||
|
"hd": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "tr",
|
||||||
|
"p": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
29.5,
|
||||||
|
29.5
|
||||||
|
],
|
||||||
|
"ix": 2
|
||||||
|
},
|
||||||
|
"a": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"ix": 1
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
100,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"ix": 3
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0,
|
||||||
|
"ix": 6
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 100,
|
||||||
|
"ix": 7
|
||||||
|
},
|
||||||
|
"sk": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0,
|
||||||
|
"ix": 4
|
||||||
|
},
|
||||||
|
"sa": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0,
|
||||||
|
"ix": 5
|
||||||
|
},
|
||||||
|
"nm": "Transform"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"nm": "Gruppo 1",
|
||||||
|
"np": 2,
|
||||||
|
"cix": 2,
|
||||||
|
"bm": 0,
|
||||||
|
"ix": 1,
|
||||||
|
"mn": "ADBE Vector Group",
|
||||||
|
"hd": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "tm",
|
||||||
|
"s": {
|
||||||
|
"a": 1,
|
||||||
|
"k": [
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": 0,
|
||||||
|
"s": [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"t": 36,
|
||||||
|
"s": [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ix": 1
|
||||||
|
},
|
||||||
|
"e": {
|
||||||
|
"a": 1,
|
||||||
|
"k": [
|
||||||
|
{
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
0.833
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.833
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0.167
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.167
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"t": 0,
|
||||||
|
"s": [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"t": 36,
|
||||||
|
"s": [
|
||||||
|
100
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ix": 2
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0,
|
||||||
|
"ix": 3
|
||||||
|
},
|
||||||
|
"m": 1,
|
||||||
|
"ix": 2,
|
||||||
|
"nm": "Taglia tracciati 1",
|
||||||
|
"mn": "ADBE Vector Filter - Trim",
|
||||||
|
"hd": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "rd",
|
||||||
|
"nm": "Angoli arrotondati 1",
|
||||||
|
"r": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 10,
|
||||||
|
"ix": 1
|
||||||
|
},
|
||||||
|
"ix": 3,
|
||||||
|
"mn": "ADBE Vector Filter - RC",
|
||||||
|
"hd": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ip": 0,
|
||||||
|
"op": 57,
|
||||||
|
"st": 0,
|
||||||
|
"bm": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"ddd": 0,
|
||||||
|
"ind": 1,
|
||||||
|
"ty": 0,
|
||||||
|
"nm": "Warning_2",
|
||||||
|
"refId": "comp_0",
|
||||||
|
"sr": 1,
|
||||||
|
"ks": {
|
||||||
|
"o": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 100,
|
||||||
|
"ix": 11
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"a": 0,
|
||||||
|
"k": 0,
|
||||||
|
"ix": 10
|
||||||
|
},
|
||||||
|
"p": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
530,
|
||||||
|
530,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"ix": 2,
|
||||||
|
"l": 2
|
||||||
|
},
|
||||||
|
"a": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
24,
|
||||||
|
24,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"ix": 1,
|
||||||
|
"l": 2
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"a": 0,
|
||||||
|
"k": [
|
||||||
|
2000,
|
||||||
|
2000,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"ix": 6,
|
||||||
|
"l": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ao": 0,
|
||||||
|
"w": 48,
|
||||||
|
"h": 48,
|
||||||
|
"ip": 0,
|
||||||
|
"op": 57,
|
||||||
|
"st": 0,
|
||||||
|
"bm": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"markers": []
|
||||||
|
}
|
1
example/assets/Tests/SplitPathTransform.json
Normal file
1
example/assets/Tests/SplitPathTransform.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"v":"5.7.4","fr":60,"ip":0,"op":63,"w":400,"h":400,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.984],"y":[0.777]},"o":{"x":[0.411],"y":[0.047]},"t":0,"s":[200]},{"t":62,"s":[460]}],"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.926],"y":[0.943]},"o":{"x":[0.028],"y":[1.152]},"t":0,"s":[200]},{"t":62,"s":[460]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[119.332,119.332],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-130.404,-126.932],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":63,"st":0,"bm":0}],"markers":[]}
|
2039
example/assets/Tests/TextWithPsCenter.json
Normal file
2039
example/assets/Tests/TextWithPsCenter.json
Normal file
File diff suppressed because it is too large
Load Diff
1626
example/assets/Tests/TextWithPsLeft.json
Normal file
1626
example/assets/Tests/TextWithPsLeft.json
Normal file
File diff suppressed because it is too large
Load Diff
1
example/assets/Tests/Thumb.json
Normal file
1
example/assets/Tests/Thumb.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"v":"5.9.6","fr":29.9700012207031,"ip":0,"op":190.000007738859,"w":24,"h":24,"nm":"Thumb","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[12,12,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":5,"ix":6},"is":{"a":0,"k":0,"ix":8},"or":{"a":0,"k":12,"ix":7},"os":{"a":0,"k":0,"ix":9},"ix":1,"nm":"Polystar Path 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.922702133656,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":190.000007738859,"st":0,"ct":1,"bm":0}],"markers":[]}
|
1
example/assets/Tests/TimeStretchAndStartOffset.json
Normal file
1
example/assets/Tests/TimeStretchAndStartOffset.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"v":"5.5.8","fr":60,"ip":0,"op":166,"w":828,"h":1215,"nm":"Залитые дуги 10 + opacity","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Sinie 2","td":1,"sr":1.53474205216067,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[413.199,607.88,0],"ix":2},"a":{"a":0,"k":[168.949,195.88,0],"ix":1},"s":{"a":0,"k":[207.219,207.219,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[11.998,6.913],[13.844,0.193],[-28.149,-0.401]],"o":[[-11.991,-6.921],[14.447,24.162],[-7.102,-11.886]],"v":[[5.137,-8.915],[-34.263,-19.764],[34.265,19.754]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-14.745,-25.464],[0.311,-0.18],[0.113,0],[14.745,25.466],[-0.31,0.179],[-0.114,0]],"o":[[29.425,0.007],[0.178,0.311],[-0.098,0.056],[-29.427,-0.005],[-0.179,-0.31],[0.099,-0.057],[0,0]],"v":[[-35.4,-21.063],[35.964,20.09],[35.725,20.977],[35.403,21.063],[-35.963,-20.09],[-35.725,-20.976],[-35.401,-21.063]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.894117706897,0,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[132.535,174.966],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":48,"op":166,"st":-37.8760708166762,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Krug siniy 2","tt":1,"sr":0.98917079207921,"ks":{"o":{"a":0,"k":50,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[412.455,610.955,0],"ix":2},"a":{"a":0,"k":[135.603,464.717,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[0.252,0.252,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":55,"s":[0,0,100]},{"t":111.000102732441,"s":[79.385,79.385,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,105.185],[105.185,0],[0,-105.185],[-105.186,0]],"o":[[0,-105.185],[-105.186,0],[0,105.185],[105.185,0]],"v":[[190.455,0],[0,-190.455],[-190.455,0],[0,190.456]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[135.603,464.717],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[174.179,174.179],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":48,"op":166,"st":25.2165841584158,"bm":0}],"markers":[]}
|
BIN
example/assets/Tests/ZipInlineImage.zip
Normal file
BIN
example/assets/Tests/ZipInlineImage.zip
Normal file
Binary file not shown.
BIN
example/assets/Tests/anim_jpg.zip
Normal file
BIN
example/assets/Tests/anim_jpg.zip
Normal file
Binary file not shown.
2492
example/assets/Tests/wile.json
Normal file
2492
example/assets/Tests/wile.json
Normal file
File diff suppressed because it is too large
Load Diff
243
example/assets/issue270.json
Normal file
243
example/assets/issue270.json
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
{
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"ddd": 0,
|
||||||
|
"ty": 4,
|
||||||
|
"ind": 0,
|
||||||
|
"sr": 1,
|
||||||
|
"ip": 0,
|
||||||
|
"op": 180,
|
||||||
|
"st": 0,
|
||||||
|
"ks": {
|
||||||
|
"a": {
|
||||||
|
"k": [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"p": {
|
||||||
|
"k": [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"k": [
|
||||||
|
100,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"k": 0,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"k": 100,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"sk": {
|
||||||
|
"k": 0,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"sa": {
|
||||||
|
"k": 0,
|
||||||
|
"a": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ao": 0,
|
||||||
|
"bm": 0,
|
||||||
|
"shapes": [
|
||||||
|
{
|
||||||
|
"ty": "gr",
|
||||||
|
"it": [
|
||||||
|
{
|
||||||
|
"ty": "sh",
|
||||||
|
"d": 1,
|
||||||
|
"ks": {
|
||||||
|
"k": {
|
||||||
|
"c": false,
|
||||||
|
"i": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
32,
|
||||||
|
-32
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-64,
|
||||||
|
-64
|
||||||
|
],
|
||||||
|
[
|
||||||
|
64,
|
||||||
|
64
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"o": [
|
||||||
|
[
|
||||||
|
64,
|
||||||
|
64
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-32,
|
||||||
|
32
|
||||||
|
],
|
||||||
|
[
|
||||||
|
-64,
|
||||||
|
64
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"v": [
|
||||||
|
[
|
||||||
|
256,
|
||||||
|
128
|
||||||
|
],
|
||||||
|
[
|
||||||
|
256,
|
||||||
|
376
|
||||||
|
],
|
||||||
|
[
|
||||||
|
256,
|
||||||
|
256
|
||||||
|
],
|
||||||
|
[
|
||||||
|
128,
|
||||||
|
376
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"a": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "st",
|
||||||
|
"lc": 2,
|
||||||
|
"lj": 2,
|
||||||
|
"ml": 0,
|
||||||
|
"o": {
|
||||||
|
"k": 100,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"w": {
|
||||||
|
"k": 5,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"c": {
|
||||||
|
"k": [
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"a": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "tr",
|
||||||
|
"a": {
|
||||||
|
"k": [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"p": {
|
||||||
|
"k": [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"k": [
|
||||||
|
100,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"k": 0,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"k": 100,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"sk": {
|
||||||
|
"k": 0,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"sa": {
|
||||||
|
"k": 0,
|
||||||
|
"a": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ty": "tm",
|
||||||
|
"s": {
|
||||||
|
"k": 0,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"e": {
|
||||||
|
"k": 50,
|
||||||
|
"a": 0
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"a": 1,
|
||||||
|
"k": [
|
||||||
|
{
|
||||||
|
"t": 0,
|
||||||
|
"i": {
|
||||||
|
"x": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
1
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"o": {
|
||||||
|
"x": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"s": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"e": [
|
||||||
|
360
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"t": 180,
|
||||||
|
"s": [
|
||||||
|
360
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"v": "5.5.2",
|
||||||
|
"fr": 60,
|
||||||
|
"ip": 0,
|
||||||
|
"op": 180,
|
||||||
|
"w": 968,
|
||||||
|
"h": 1090,
|
||||||
|
"ddd": 0,
|
||||||
|
"assets": []
|
||||||
|
}
|
@ -5,7 +5,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const App());
|
void main() => runApp(const App());
|
||||||
|
|
||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -6,7 +6,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -4,7 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class MyApp extends StatefulWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyApp> createState() => _MyAppState();
|
State<MyApp> createState() => _MyAppState();
|
||||||
|
@ -12,7 +12,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class MyApp extends StatefulWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyApp> createState() => _MyAppState();
|
State<MyApp> createState() => _MyAppState();
|
||||||
|
@ -4,7 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
59
example/lib/examples/cache.dart
Normal file
59
example/lib/examples/cache.dart
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:lottie/lottie.dart';
|
||||||
|
|
||||||
|
void main() => runApp(const App());
|
||||||
|
|
||||||
|
class App extends StatelessWidget {
|
||||||
|
const App({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MaterialApp(
|
||||||
|
home: Scaffold(body: _Page()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Page extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
__PageState createState() => __PageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class __PageState extends State<_Page> {
|
||||||
|
var _animationKey = UniqueKey();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Lottie.network(
|
||||||
|
'https://assets10.lottiefiles.com/datafiles/QeC7XD39x4C1CIj/data.json',
|
||||||
|
key: _animationKey,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
width: 200,
|
||||||
|
height: 200,
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
Lottie.cache.clear();
|
||||||
|
Lottie.cache.maximumSize = 10;
|
||||||
|
},
|
||||||
|
child: const Text('Clear cache'),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_animationKey = UniqueKey();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: const Text('Recreate animation'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -18,7 +18,7 @@ class MyApp extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MyWidget extends StatefulWidget {
|
class MyWidget extends StatefulWidget {
|
||||||
const MyWidget({Key? key}) : super(key: key);
|
const MyWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyWidget> createState() => _MyWidgetState();
|
State<MyWidget> createState() => _MyWidgetState();
|
||||||
@ -60,7 +60,7 @@ class _MyWidgetState extends State<MyWidget> {
|
|||||||
class CustomDrawer extends StatelessWidget {
|
class CustomDrawer extends StatelessWidget {
|
||||||
final LottieComposition composition;
|
final LottieComposition composition;
|
||||||
|
|
||||||
const CustomDrawer(this.composition, {Key? key}) : super(key: key);
|
const CustomDrawer(this.composition, {super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:lottie/lottie.dart';
|
import 'package:lottie/lottie.dart';
|
||||||
|
|
||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -19,7 +18,7 @@ class MyApp extends StatelessWidget {
|
|||||||
|
|
||||||
//--- example
|
//--- example
|
||||||
class MyWidget extends StatefulWidget {
|
class MyWidget extends StatefulWidget {
|
||||||
const MyWidget({Key? key}) : super(key: key);
|
const MyWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyWidget> createState() => _MyWidgetState();
|
State<MyWidget> createState() => _MyWidgetState();
|
||||||
@ -32,12 +31,7 @@ class _MyWidgetState extends State<MyWidget> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
_composition = _loadComposition();
|
_composition = AssetLottie('assets/LottieLogo1.json').load();
|
||||||
}
|
|
||||||
|
|
||||||
Future<LottieComposition> _loadComposition() async {
|
|
||||||
var assetData = await rootBundle.load('assets/LottieLogo1.json');
|
|
||||||
return await LottieComposition.fromByteData(assetData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
130
example/lib/examples/draw_cache.dart
Normal file
130
example/lib/examples/draw_cache.dart
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
import 'package:flutter/material.dart' hide Image;
|
||||||
|
import 'package:flutter/material.dart' as material;
|
||||||
|
import 'package:lottie/lottie.dart';
|
||||||
|
|
||||||
|
/// This example shows how to cache the animation as a List<Image>.
|
||||||
|
/// After the initial cache of each frame, drawing the animation is almost free
|
||||||
|
/// in term of CPU usage.
|
||||||
|
/// The animation will run at a specific framerate (not FrameRate.max) and specific size
|
||||||
|
void main() async {
|
||||||
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
|
// Pre-load the animation for simplicity in this example
|
||||||
|
var animation = await AssetLottie('assets/AndroidWave.json').load();
|
||||||
|
|
||||||
|
// Pick a specific size for our cache.
|
||||||
|
// In a real app, we may want to defer choosing the size after an initial
|
||||||
|
// Layout (ie. using LayoutBuilder)
|
||||||
|
var cachedAnimation = CachedLottie(const Size(150, 200), animation);
|
||||||
|
runApp(_Example(
|
||||||
|
lottie: cachedAnimation,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Example extends StatelessWidget {
|
||||||
|
final CachedLottie lottie;
|
||||||
|
|
||||||
|
const _Example({required this.lottie});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MaterialApp(
|
||||||
|
home: Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('Cache'),
|
||||||
|
),
|
||||||
|
body: ListView(
|
||||||
|
children: [
|
||||||
|
for (var i = 0; i < 20; i++)
|
||||||
|
Stack(
|
||||||
|
children: [
|
||||||
|
for (var j = 0; j < 50; j++)
|
||||||
|
Transform.translate(
|
||||||
|
offset: Offset(j.toDouble() * 20, 0),
|
||||||
|
child: CachedLottiePlayer(
|
||||||
|
lottie: lottie,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CachedLottie {
|
||||||
|
final Size size;
|
||||||
|
final LottieComposition composition;
|
||||||
|
final List<Image?> images;
|
||||||
|
late final _drawable = LottieDrawable(composition);
|
||||||
|
|
||||||
|
CachedLottie(this.size, this.composition)
|
||||||
|
: images = List.filled(composition.durationFrames.ceil(), null);
|
||||||
|
|
||||||
|
Duration get duration => composition.duration;
|
||||||
|
|
||||||
|
Image imageAt(BuildContext context, double progress) {
|
||||||
|
var index = (images.length * progress).round() % images.length;
|
||||||
|
return images[index] ??= _takeImage(context, progress);
|
||||||
|
}
|
||||||
|
|
||||||
|
Image _takeImage(BuildContext context, double progress) {
|
||||||
|
var recorder = PictureRecorder();
|
||||||
|
var canvas = Canvas(recorder);
|
||||||
|
|
||||||
|
var devicePixelRatio = View.of(context).devicePixelRatio;
|
||||||
|
|
||||||
|
_drawable
|
||||||
|
..setProgress(progress)
|
||||||
|
..draw(canvas, Offset.zero & (size * devicePixelRatio));
|
||||||
|
var picture = recorder.endRecording();
|
||||||
|
return picture.toImageSync((size.width * devicePixelRatio).round(),
|
||||||
|
(size.height * devicePixelRatio).round());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CachedLottiePlayer extends StatefulWidget {
|
||||||
|
final CachedLottie lottie;
|
||||||
|
final AnimationController? controller;
|
||||||
|
|
||||||
|
const CachedLottiePlayer({
|
||||||
|
super.key,
|
||||||
|
required this.lottie,
|
||||||
|
this.controller,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CachedLottiePlayer> createState() => _CachedLottiePlayerState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CachedLottiePlayerState extends State<CachedLottiePlayer>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
|
late final AnimationController _autoController =
|
||||||
|
AnimationController(vsync: this, duration: widget.lottie.duration)
|
||||||
|
..repeat();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
var controller = widget.controller ?? _autoController;
|
||||||
|
return AnimatedBuilder(
|
||||||
|
animation: controller,
|
||||||
|
builder: (context, _) {
|
||||||
|
var image = widget.lottie.imageAt(context, controller.value);
|
||||||
|
return material.RawImage(
|
||||||
|
image: image,
|
||||||
|
width: widget.lottie.size.width,
|
||||||
|
height: widget.lottie.size.height,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_autoController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
}
|
@ -4,7 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -7,7 +7,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatefulWidget {
|
class App extends StatefulWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<App> createState() => _AppState();
|
State<App> createState() => _AppState();
|
||||||
|
@ -7,7 +7,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatefulWidget {
|
class App extends StatefulWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<App> createState() => _AppState();
|
State<App> createState() => _AppState();
|
||||||
|
@ -4,7 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -4,7 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -6,7 +6,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatefulWidget {
|
class App extends StatefulWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<App> createState() => _AppState();
|
State<App> createState() => _AppState();
|
||||||
|
@ -9,7 +9,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatefulWidget {
|
class App extends StatefulWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<App> createState() => _AppState();
|
State<App> createState() => _AppState();
|
||||||
@ -48,7 +48,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
|||||||
class _LottieDetails extends StatefulWidget {
|
class _LottieDetails extends StatefulWidget {
|
||||||
final LottieComposition composition;
|
final LottieComposition composition;
|
||||||
|
|
||||||
const _LottieDetails(this.composition, {Key? key}) : super(key: key);
|
const _LottieDetails(this.composition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_LottieDetailsState createState() => _LottieDetailsState();
|
_LottieDetailsState createState() => _LottieDetailsState();
|
||||||
|
@ -4,7 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class MyApp extends StatefulWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyApp> createState() => _MyAppState();
|
State<MyApp> createState() => _MyAppState();
|
||||||
|
@ -12,7 +12,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatefulWidget {
|
class App extends StatefulWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<App> createState() => _AppState();
|
State<App> createState() => _AppState();
|
||||||
|
@ -10,7 +10,7 @@ import 'package:path_provider/path_provider.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class MyApp extends StatefulWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyApp> createState() => _MyAppState();
|
State<MyApp> createState() => _MyAppState();
|
||||||
|
@ -4,7 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -4,7 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||||||
void main() => runApp(const MyApp());
|
void main() => runApp(const MyApp());
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -14,7 +14,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -24,37 +24,37 @@ class App extends StatelessWidget {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Lottie Flutter'),
|
title: const Text('Lottie Flutter'),
|
||||||
),
|
),
|
||||||
body: Scrollbar(
|
body: GridView.builder(
|
||||||
child: GridView.builder(
|
primary: true,
|
||||||
itemCount: files.length,
|
itemCount: files.length,
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 4),
|
crossAxisCount: 4),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
var assetName = files[index];
|
var assetName = files[index];
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute<void>(
|
MaterialPageRoute<void>(
|
||||||
builder: (context) => Detail(assetName)));
|
builder: (context) => Detail(assetName)));
|
||||||
},
|
},
|
||||||
child: _Item(
|
child: _Item(
|
||||||
child: Lottie.asset(
|
child: Lottie.asset(
|
||||||
assetName,
|
assetName,
|
||||||
onWarning: (w) => _logger.info('$assetName - $w'),
|
fit: BoxFit.contain,
|
||||||
frameBuilder: (context, child, composition) {
|
onWarning: (w) => _logger.info('$assetName - $w'),
|
||||||
return AnimatedOpacity(
|
frameBuilder: (context, child, composition) {
|
||||||
opacity: composition == null ? 0 : 1,
|
return AnimatedOpacity(
|
||||||
duration: const Duration(seconds: 1),
|
opacity: composition == null ? 0 : 1,
|
||||||
curve: Curves.easeOut,
|
duration: const Duration(seconds: 1),
|
||||||
child: child,
|
curve: Curves.easeOut,
|
||||||
);
|
child: child,
|
||||||
},
|
);
|
||||||
),
|
},
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
},
|
);
|
||||||
),
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -64,7 +64,7 @@ class App extends StatelessWidget {
|
|||||||
class _Item extends StatelessWidget {
|
class _Item extends StatelessWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
||||||
const _Item({Key? key, required this.child}) : super(key: key);
|
const _Item({required this.child});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -89,7 +89,7 @@ class _Item extends StatelessWidget {
|
|||||||
class Detail extends StatefulWidget {
|
class Detail extends StatefulWidget {
|
||||||
final String assetName;
|
final String assetName;
|
||||||
|
|
||||||
const Detail(this.assetName, {Key? key}) : super(key: key);
|
const Detail(this.assetName, {super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<Detail> createState() => _DetailState();
|
State<Detail> createState() => _DetailState();
|
||||||
|
@ -13,7 +13,7 @@ void main() async {
|
|||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
final LottieComposition composition;
|
final LottieComposition composition;
|
||||||
|
|
||||||
const App({Key? key, required this.composition}) : super(key: key);
|
const App({super.key, required this.composition});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -103,8 +103,7 @@ class _Lottie extends StatefulWidget {
|
|||||||
final AlignmentGeometry? alignment;
|
final AlignmentGeometry? alignment;
|
||||||
|
|
||||||
const _Lottie(this.composition,
|
const _Lottie(this.composition,
|
||||||
{Key? key, this.width, this.height, this.fit, this.alignment})
|
{this.width, this.height, this.fit, this.alignment});
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
__LottieState createState() => __LottieState();
|
__LottieState createState() => __LottieState();
|
||||||
|
@ -43,18 +43,32 @@ final files = [
|
|||||||
'assets/Tests/Airbnb.zip',
|
'assets/Tests/Airbnb.zip',
|
||||||
'assets/Tests/Airbnb400.zip',
|
'assets/Tests/Airbnb400.zip',
|
||||||
'assets/Tests/Airbnb800.zip',
|
'assets/Tests/Airbnb800.zip',
|
||||||
|
'assets/Tests/AnimatedShadow.json',
|
||||||
|
'assets/Tests/BeyondBounds.json',
|
||||||
|
'assets/Tests/BoxPosition.json',
|
||||||
'assets/Tests/CheckSwitch.json',
|
'assets/Tests/CheckSwitch.json',
|
||||||
'assets/Tests/DifferentPointsCount.json',
|
'assets/Tests/DifferentPointsCount.json',
|
||||||
'assets/Tests/DynamicGradient.json',
|
'assets/Tests/DynamicGradient.json',
|
||||||
'assets/Tests/DynamicText.json',
|
'assets/Tests/DynamicText.json',
|
||||||
|
'assets/Tests/EditedColor.json',
|
||||||
'assets/Tests/EllipseDirection.json',
|
'assets/Tests/EllipseDirection.json',
|
||||||
|
'assets/Tests/EmbeddedFont.zip',
|
||||||
'assets/Tests/EndFrame.json',
|
'assets/Tests/EndFrame.json',
|
||||||
'assets/Tests/Fill.json',
|
'assets/Tests/Fill.json',
|
||||||
|
'assets/Tests/FillBlur.json',
|
||||||
'assets/Tests/Font_Text_Justification_Translate_Scale_Rotation_Test.json',
|
'assets/Tests/Font_Text_Justification_Translate_Scale_Rotation_Test.json',
|
||||||
'assets/Tests/Frame.json',
|
'assets/Tests/Frame.json',
|
||||||
|
'assets/Tests/Framerate.json',
|
||||||
'assets/Tests/GradientFill.json',
|
'assets/Tests/GradientFill.json',
|
||||||
|
'assets/Tests/GradientFillBlur.json',
|
||||||
|
'assets/Tests/GradientOneColor.json',
|
||||||
|
'assets/Tests/GradientOpacityInterpolation.json',
|
||||||
|
'assets/Tests/GradientStrokeBlur.json',
|
||||||
|
'assets/Tests/Heart.json',
|
||||||
|
'assets/Tests/InterpolateBetweenOpacityStops.json',
|
||||||
'assets/Tests/InterpolatorLoopBack.json',
|
'assets/Tests/InterpolatorLoopBack.json',
|
||||||
'assets/Tests/KeyframeTypes.json',
|
'assets/Tests/KeyframeTypes.json',
|
||||||
|
'assets/Tests/LargeComposition.json',
|
||||||
'assets/Tests/Laugh4.json',
|
'assets/Tests/Laugh4.json',
|
||||||
'assets/Tests/LoopPlayOnce.json',
|
'assets/Tests/LoopPlayOnce.json',
|
||||||
'assets/Tests/Marker.json',
|
'assets/Tests/Marker.json',
|
||||||
@ -65,39 +79,66 @@ final files = [
|
|||||||
'assets/Tests/MatteTimeStretchLine.json',
|
'assets/Tests/MatteTimeStretchLine.json',
|
||||||
'assets/Tests/MatteTimeStretchScan.json',
|
'assets/Tests/MatteTimeStretchScan.json',
|
||||||
'assets/Tests/MiterLimit.json',
|
'assets/Tests/MiterLimit.json',
|
||||||
|
'assets/Tests/Multiline.json',
|
||||||
|
'assets/Tests/OpacityStops.json',
|
||||||
'assets/Tests/OverlapShapeWithOpacity.json',
|
'assets/Tests/OverlapShapeWithOpacity.json',
|
||||||
'assets/Tests/Parenting.json',
|
'assets/Tests/Parenting.json',
|
||||||
|
'assets/Tests/PrecompBlur.json',
|
||||||
|
'assets/Tests/PrecompBlurDecimapPrecompSize.json',
|
||||||
'assets/Tests/Precomps.json',
|
'assets/Tests/Precomps.json',
|
||||||
'assets/Tests/RGB.json',
|
'assets/Tests/RGB.json',
|
||||||
'assets/Tests/RGBMarker.json',
|
'assets/Tests/RGBMarker.json',
|
||||||
|
'assets/Tests/Rect1.json',
|
||||||
|
'assets/Tests/Rect3.json',
|
||||||
|
'assets/Tests/Rect4.json',
|
||||||
|
'assets/Tests/Rect5.json',
|
||||||
|
'assets/Tests/Rect6.json',
|
||||||
|
'assets/Tests/Rect7.json',
|
||||||
|
'assets/Tests/Rect8.json',
|
||||||
|
'assets/Tests/Rect9.json',
|
||||||
'assets/Tests/Remap.json',
|
'assets/Tests/Remap.json',
|
||||||
'assets/Tests/Repeater.json',
|
'assets/Tests/Repeater.json',
|
||||||
|
'assets/Tests/ReversedStar.json',
|
||||||
|
'assets/Tests/RoundedCorners.json',
|
||||||
|
'assets/Tests/RoundedWithAlreadyRoundedCorners.json',
|
||||||
'assets/Tests/Scale0.json',
|
'assets/Tests/Scale0.json',
|
||||||
'assets/Tests/ShapeTypes.json',
|
'assets/Tests/ShapeTypes.json',
|
||||||
'assets/Tests/Shapes.json',
|
'assets/Tests/Shapes.json',
|
||||||
'assets/Tests/Skew.json',
|
'assets/Tests/Skew.json',
|
||||||
'assets/Tests/SolidLayerTransform.json',
|
'assets/Tests/SolidLayerTransform.json',
|
||||||
'assets/Tests/SplitDimensions.json',
|
'assets/Tests/SplitDimensions.json',
|
||||||
|
'assets/Tests/SplitPathTransform.json',
|
||||||
'assets/Tests/Squares.json',
|
'assets/Tests/Squares.json',
|
||||||
'assets/Tests/StarSkew.json',
|
'assets/Tests/StarSkew.json',
|
||||||
'assets/Tests/StartEndFrame.json',
|
'assets/Tests/StartEndFrame.json',
|
||||||
|
'assets/Tests/StaticShadow.json',
|
||||||
'assets/Tests/Stroke.json',
|
'assets/Tests/Stroke.json',
|
||||||
|
'assets/Tests/StrokeBlur.json',
|
||||||
'assets/Tests/TelegramAlphaCompat.json',
|
'assets/Tests/TelegramAlphaCompat.json',
|
||||||
'assets/Tests/Text.json',
|
'assets/Tests/Text.json',
|
||||||
'assets/Tests/TextBaseline.json',
|
'assets/Tests/TextBaseline.json',
|
||||||
|
'assets/Tests/TextWithPsCenter.json',
|
||||||
|
'assets/Tests/TextWithPsLeft.json',
|
||||||
'assets/Tests/Text_Justification_Translate_Scale_Rotation_Text.json',
|
'assets/Tests/Text_Justification_Translate_Scale_Rotation_Text.json',
|
||||||
|
'assets/Tests/TgsWithoutOpacity.json',
|
||||||
|
'assets/Tests/Thumb.json',
|
||||||
'assets/Tests/TimeRemapAndStartOffset.json',
|
'assets/Tests/TimeRemapAndStartOffset.json',
|
||||||
'assets/Tests/TimeStretch.json',
|
'assets/Tests/TimeStretch.json',
|
||||||
|
'assets/Tests/TimeStretchAndStartOffset.json',
|
||||||
'assets/Tests/TimeStretchMask.json',
|
'assets/Tests/TimeStretchMask.json',
|
||||||
'assets/Tests/TimeStretchPrecomp.json',
|
'assets/Tests/TimeStretchPrecomp.json',
|
||||||
|
'assets/Tests/TimeStretchPrecomp2.json',
|
||||||
'assets/Tests/TrackMattes.json',
|
'assets/Tests/TrackMattes.json',
|
||||||
'assets/Tests/TransformWithoutEndValues.json',
|
'assets/Tests/TransformWithoutEndValues.json',
|
||||||
|
'assets/Tests/TrimPathWrapAround.json',
|
||||||
'assets/Tests/TrimPaths.json',
|
'assets/Tests/TrimPaths.json',
|
||||||
'assets/Tests/TrimPathsInsideAndOutsideGroup.json',
|
'assets/Tests/TrimPathsInsideAndOutsideGroup.json',
|
||||||
'assets/Tests/WeAccept.json',
|
'assets/Tests/WeAccept.json',
|
||||||
'assets/Tests/WeAcceptInlineImage.json',
|
'assets/Tests/WeAcceptInlineImage.json',
|
||||||
|
'assets/Tests/ZipInlineImage.zip',
|
||||||
'assets/Tests/adrock.json',
|
'assets/Tests/adrock.json',
|
||||||
'assets/Tests/adrock_converted.json',
|
'assets/Tests/adrock_converted.json',
|
||||||
|
'assets/Tests/anim_jpg.zip',
|
||||||
'assets/Tests/august_view_pulse.zip',
|
'assets/Tests/august_view_pulse.zip',
|
||||||
'assets/Tests/bm.json',
|
'assets/Tests/bm.json',
|
||||||
'assets/Tests/bm_converted.json',
|
'assets/Tests/bm_converted.json',
|
||||||
@ -105,8 +146,11 @@ final files = [
|
|||||||
'assets/Tests/catrim_converted.json',
|
'assets/Tests/catrim_converted.json',
|
||||||
'assets/Tests/dalek.json',
|
'assets/Tests/dalek.json',
|
||||||
'assets/Tests/dalek_converted.json',
|
'assets/Tests/dalek_converted.json',
|
||||||
|
'assets/Tests/exported_with_flow.json',
|
||||||
'assets/Tests/hd.json',
|
'assets/Tests/hd.json',
|
||||||
'assets/Tests/map.zip',
|
'assets/Tests/map.zip',
|
||||||
|
'assets/Tests/rect2.json',
|
||||||
|
'assets/Tests/wile.json',
|
||||||
'assets/TwitterHeartButton.json',
|
'assets/TwitterHeartButton.json',
|
||||||
'assets/battery_optimizations.json',
|
'assets/battery_optimizations.json',
|
||||||
'assets/bluetoothscanning.json',
|
'assets/bluetoothscanning.json',
|
||||||
@ -221,6 +265,7 @@ final files = [
|
|||||||
'assets/lottiefiles/la_calavera.json',
|
'assets/lottiefiles/la_calavera.json',
|
||||||
'assets/lottiefiles/landing_page.json',
|
'assets/lottiefiles/landing_page.json',
|
||||||
'assets/lottiefiles/lego_loader.json',
|
'assets/lottiefiles/lego_loader.json',
|
||||||
|
'assets/lottiefiles/lf20_fteywrno.json',
|
||||||
'assets/lottiefiles/light.json',
|
'assets/lottiefiles/light.json',
|
||||||
'assets/lottiefiles/lightsaber.json',
|
'assets/lottiefiles/lightsaber.json',
|
||||||
'assets/lottiefiles/little_girl_jumping_-_loader.json',
|
'assets/lottiefiles/little_girl_jumping_-_loader.json',
|
||||||
|
@ -6,7 +6,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -6,7 +6,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
11
example/linux/flutter/generated_plugin_registrant.cc
Normal file
11
example/linux/flutter/generated_plugin_registrant.cc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
|
|
||||||
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
|
}
|
15
example/linux/flutter/generated_plugin_registrant.h
Normal file
15
example/linux/flutter/generated_plugin_registrant.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||||
|
#define GENERATED_PLUGIN_REGISTRANT_
|
||||||
|
|
||||||
|
#include <flutter_linux/flutter_linux.h>
|
||||||
|
|
||||||
|
// Registers Flutter plugins.
|
||||||
|
void fl_register_plugins(FlPluginRegistry* registry);
|
||||||
|
|
||||||
|
#endif // GENERATED_PLUGIN_REGISTRANT_
|
23
example/linux/flutter/generated_plugins.cmake
Normal file
23
example/linux/flutter/generated_plugins.cmake
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#
|
||||||
|
# Generated file, do not edit.
|
||||||
|
#
|
||||||
|
|
||||||
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
)
|
||||||
|
|
||||||
|
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||||
|
|
||||||
|
foreach(plugin ${FLUTTER_PLUGIN_LIST})
|
||||||
|
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
|
||||||
|
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
|
||||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
|
||||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
|
||||||
|
endforeach(plugin)
|
||||||
|
|
||||||
|
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
|
||||||
|
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
|
||||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
|
||||||
|
endforeach(ffi_plugin)
|
@ -5,7 +5,7 @@
|
|||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import path_provider_macos
|
import path_provider_foundation
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
platform :osx, '10.11'
|
platform :osx, '10.14'
|
||||||
|
|
||||||
# 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'
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- FlutterMacOS (1.0.0)
|
- FlutterMacOS (1.0.0)
|
||||||
- path_provider_macos (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
FlutterMacOS:
|
FlutterMacOS:
|
||||||
:path: Flutter/ephemeral
|
:path: Flutter/ephemeral
|
||||||
path_provider_macos:
|
path_provider_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f
|
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
|
||||||
|
|
||||||
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
|
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.12.1
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 51;
|
objectVersion = 54;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXAggregateTarget section */
|
/* Begin PBXAggregateTarget section */
|
||||||
@ -203,7 +203,7 @@
|
|||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastSwiftUpdateCheck = 0920;
|
LastSwiftUpdateCheck = 0920;
|
||||||
LastUpgradeCheck = 0930;
|
LastUpgradeCheck = 1300;
|
||||||
ORGANIZATIONNAME = "The Flutter Authors";
|
ORGANIZATIONNAME = "The Flutter Authors";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
33CC10EC2044A3C60003C045 = {
|
33CC10EC2044A3C60003C045 = {
|
||||||
@ -256,6 +256,7 @@
|
|||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
@ -320,11 +321,11 @@
|
|||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||||
"${BUILT_PRODUCTS_DIR}/path_provider_macos/path_provider_macos.framework",
|
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
|
||||||
);
|
);
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_macos.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
@ -405,7 +406,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;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
@ -488,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;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
@ -535,7 +536,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;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1000"
|
LastUpgradeVersion = "1300"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
@ -5,79 +5,90 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: archive
|
name: archive
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.3.1"
|
version: "3.3.7"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.8.2"
|
version: "2.11.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.0"
|
||||||
charcode:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: charcode
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.1"
|
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.dartlang.org"
|
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.16.0"
|
version: "1.17.1"
|
||||||
|
convert:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: convert
|
||||||
|
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.1"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: crypto
|
name: crypto
|
||||||
url: "https://pub.dartlang.org"
|
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.2"
|
version: "3.0.3"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.1"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: ffi
|
name: ffi
|
||||||
url: "https://pub.dartlang.org"
|
sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.2"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: file
|
name: file
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.2"
|
version: "6.1.4"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -87,14 +98,16 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_colorpicker
|
name: flutter_colorpicker
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "458a6ed8ea480eb16ff892aedb4b7092b2804affd7e046591fb03127e8d8ef8b"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.3"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
url: "https://pub.dartlang.org"
|
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@ -106,140 +119,167 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: golden_toolkit
|
name: golden_toolkit
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "8f74adab33154fe7b731395782797021f97d2edc52f7bfb85ff4f1b5c4a215f0"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.13.0"
|
version: "0.15.0"
|
||||||
http:
|
http:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: http
|
name: http
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "4c3f04bfb64d3efd508d06b41b825542f08122d30bda4933fb95c069d22a4fa3"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.13.4"
|
version: "1.0.0"
|
||||||
http_parser:
|
http_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: http_parser
|
name: http_parser
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.1"
|
version: "4.0.2"
|
||||||
|
js:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: js
|
||||||
|
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.7"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.1.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: logging
|
name: logging
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.2.0"
|
||||||
lottie:
|
lottie:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "1.4.2"
|
version: "2.4.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.11"
|
version: "0.12.15"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.dartlang.org"
|
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.4"
|
version: "0.2.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.0"
|
version: "1.9.1"
|
||||||
path:
|
path:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.3"
|
||||||
path_provider:
|
path_provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path_provider
|
name: path_provider
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.11"
|
version: "2.0.15"
|
||||||
path_provider_android:
|
path_provider_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_android
|
name: path_provider_android
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.16"
|
version: "2.0.27"
|
||||||
path_provider_ios:
|
path_provider_foundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_ios
|
name: path_provider_foundation
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.10"
|
version: "2.2.3"
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_linux
|
name: path_provider_linux
|
||||||
url: "https://pub.dartlang.org"
|
sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.7"
|
version: "2.1.11"
|
||||||
path_provider_macos:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_macos
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.6"
|
|
||||||
path_provider_platform_interface:
|
path_provider_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_platform_interface
|
name: path_provider_platform_interface
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.4"
|
version: "2.0.6"
|
||||||
path_provider_windows:
|
path_provider_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_windows
|
name: path_provider_windows
|
||||||
url: "https://pub.dartlang.org"
|
sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.6"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: platform
|
name: platform
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.0"
|
version: "3.1.0"
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: plugin_platform_interface
|
name: plugin_platform_interface
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.4"
|
||||||
|
pointycastle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pointycastle
|
||||||
|
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.7.3"
|
||||||
process:
|
process:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: process
|
name: process
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.4"
|
version: "4.2.4"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
@ -251,72 +291,82 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.2"
|
version: "1.9.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.dartlang.org"
|
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.11.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.2.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.dartlang.org"
|
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.1"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.9"
|
version: "0.5.1"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.dartlang.org"
|
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.2"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.4"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: win32
|
name: win32
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.7.0"
|
version: "4.1.4"
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: xdg_directories
|
name: xdg_directories
|
||||||
url: "https://pub.dartlang.org"
|
sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0+1"
|
version: "1.0.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.17.0 <3.0.0"
|
dart: ">=3.0.0 <4.0.0"
|
||||||
flutter: ">=3.0.0"
|
flutter: ">=3.10.0"
|
||||||
|
@ -3,7 +3,7 @@ description: A sample app for the Lottie player
|
|||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0-0 <3.0.0"
|
sdk: "^3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
@ -10,7 +10,7 @@ export 'src/options.dart' show LottieOptions;
|
|||||||
export 'src/providers/asset_provider.dart' show AssetLottie;
|
export 'src/providers/asset_provider.dart' show AssetLottie;
|
||||||
export 'src/providers/file_provider.dart' show FileLottie;
|
export 'src/providers/file_provider.dart' show FileLottie;
|
||||||
export 'src/providers/load_image.dart' show LottieImageProviderFactory;
|
export 'src/providers/load_image.dart' show LottieImageProviderFactory;
|
||||||
export 'src/providers/lottie_provider.dart' show LottieProvider;
|
export 'src/providers/lottie_provider.dart' show LottieCache, LottieProvider;
|
||||||
export 'src/providers/memory_provider.dart' show MemoryLottie;
|
export 'src/providers/memory_provider.dart' show MemoryLottie;
|
||||||
export 'src/providers/network_provider.dart' show NetworkLottie;
|
export 'src/providers/network_provider.dart' show NetworkLottie;
|
||||||
export 'src/raw_lottie.dart' show RawLottie;
|
export 'src/raw_lottie.dart' show RawLottie;
|
||||||
|
@ -144,7 +144,7 @@ abstract class BaseStrokeContent
|
|||||||
}
|
}
|
||||||
var alpha =
|
var alpha =
|
||||||
((parentAlpha / 255.0 * _opacityAnimation.value / 100.0) * 255).round();
|
((parentAlpha / 255.0 * _opacityAnimation.value / 100.0) * 255).round();
|
||||||
paint.setAlpha(alpha.clamp(0, 255).toInt());
|
paint.setAlpha(alpha.clamp(0, 255));
|
||||||
paint.strokeWidth = _widthAnimation.value * parentMatrix.getScale();
|
paint.strokeWidth = _widthAnimation.value * parentMatrix.getScale();
|
||||||
if (paint.strokeWidth <= 0) {
|
if (paint.strokeWidth <= 0) {
|
||||||
// Android draws a hairline stroke for 0, After Effects doesn't.
|
// Android draws a hairline stroke for 0, After Effects doesn't.
|
||||||
|
@ -52,18 +52,20 @@ class ContentGroup implements DrawingContent, PathContent, KeyPathElement {
|
|||||||
List<PathContent>? _pathContents;
|
List<PathContent>? _pathContents;
|
||||||
TransformKeyframeAnimation? _transformAnimation;
|
TransformKeyframeAnimation? _transformAnimation;
|
||||||
|
|
||||||
ContentGroup(final LottieDrawable lottieDrawable, BaseLayer layer,
|
ContentGroup(
|
||||||
ShapeGroup shapeGroup)
|
LottieDrawable lottieDrawable, BaseLayer layer, ShapeGroup shapeGroup)
|
||||||
: this.copy(
|
: this.copy(
|
||||||
lottieDrawable,
|
lottieDrawable,
|
||||||
layer,
|
layer,
|
||||||
shapeGroup.name,
|
shapeGroup.name,
|
||||||
shapeGroup.hidden,
|
|
||||||
contentsFromModels(lottieDrawable, layer, shapeGroup.items),
|
contentsFromModels(lottieDrawable, layer, shapeGroup.items),
|
||||||
findTransform(shapeGroup.items));
|
findTransform(shapeGroup.items),
|
||||||
|
hidden: shapeGroup.hidden);
|
||||||
|
|
||||||
ContentGroup.copy(this._lottieDrawable, BaseLayer layer, this.name,
|
ContentGroup.copy(this._lottieDrawable, BaseLayer layer, this.name,
|
||||||
this._hidden, this._contents, AnimatableTransform? transform) {
|
this._contents, AnimatableTransform? transform,
|
||||||
|
{required bool hidden})
|
||||||
|
: _hidden = hidden {
|
||||||
if (transform != null) {
|
if (transform != null) {
|
||||||
_transformAnimation = transform.createAnimation()
|
_transformAnimation = transform.createAnimation()
|
||||||
..addAnimationsToLayer(layer)
|
..addAnimationsToLayer(layer)
|
||||||
|
@ -89,7 +89,7 @@ class FillContent implements DrawingContent, KeyPathElementContent {
|
|||||||
_paint.color = _colorAnimation.value;
|
_paint.color = _colorAnimation.value;
|
||||||
var alpha =
|
var alpha =
|
||||||
((parentAlpha / 255.0 * _opacityAnimation.value / 100.0) * 255).round();
|
((parentAlpha / 255.0 * _opacityAnimation.value / 100.0) * 255).round();
|
||||||
_paint.setAlpha(alpha.clamp(0, 255).toInt());
|
_paint.setAlpha(alpha.clamp(0, 255));
|
||||||
if (lottieDrawable.antiAliasingSuggested) {
|
if (lottieDrawable.antiAliasingSuggested) {
|
||||||
_paint.isAntiAlias = true;
|
_paint.isAntiAlias = true;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
|
|||||||
|
|
||||||
var alpha =
|
var alpha =
|
||||||
((parentAlpha / 255.0 * _opacityAnimation.value / 100.0) * 255).round();
|
((parentAlpha / 255.0 * _opacityAnimation.value / 100.0) * 255).round();
|
||||||
_paint.setAlpha(alpha.clamp(0, 255).toInt());
|
_paint.setAlpha(alpha.clamp(0, 255));
|
||||||
if (lottieDrawable.antiAliasingSuggested) {
|
if (lottieDrawable.antiAliasingSuggested) {
|
||||||
_paint.isAntiAlias = true;
|
_paint.isAntiAlias = true;
|
||||||
}
|
}
|
||||||
@ -175,8 +175,7 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
|
|||||||
var gradientColor = _colorAnimation.value;
|
var gradientColor = _colorAnimation.value;
|
||||||
var colors = _applyDynamicColorsIfNeeded(gradientColor.colors);
|
var colors = _applyDynamicColorsIfNeeded(gradientColor.colors);
|
||||||
var positions = gradientColor.positions;
|
var positions = gradientColor.positions;
|
||||||
gradient = Gradient.linear(
|
gradient = Gradient.linear(startPoint, endPoint, colors, positions);
|
||||||
startPoint, endPoint, colors, positions, TileMode.clamp);
|
|
||||||
_linearGradientCache[gradientHash] = gradient;
|
_linearGradientCache[gradientHash] = gradient;
|
||||||
return gradient;
|
return gradient;
|
||||||
}
|
}
|
||||||
@ -200,8 +199,7 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
|
|||||||
if (radius <= 0) {
|
if (radius <= 0) {
|
||||||
radius = 0.001;
|
radius = 0.001;
|
||||||
}
|
}
|
||||||
gradient =
|
gradient = Gradient.radial(startPoint, radius, colors, positions);
|
||||||
Gradient.radial(startPoint, radius, colors, positions, TileMode.clamp);
|
|
||||||
_radialGradientCache[gradientHash] = gradient;
|
_radialGradientCache[gradientHash] = gradient;
|
||||||
return gradient;
|
return gradient;
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,8 @@ class GradientStrokeContent extends BaseStrokeContent {
|
|||||||
ValueCallbackKeyframeAnimation<List<Color>, List<Color>>?
|
ValueCallbackKeyframeAnimation<List<Color>, List<Color>>?
|
||||||
_colorCallbackAnimation;
|
_colorCallbackAnimation;
|
||||||
|
|
||||||
GradientStrokeContent(final LottieDrawable lottieDrawable, BaseLayer layer,
|
GradientStrokeContent(
|
||||||
GradientStroke stroke)
|
LottieDrawable lottieDrawable, BaseLayer layer, GradientStroke stroke)
|
||||||
: name = stroke.name,
|
: name = stroke.name,
|
||||||
_type = stroke.gradientType,
|
_type = stroke.gradientType,
|
||||||
_hidden = stroke.hidden,
|
_hidden = stroke.hidden,
|
||||||
|
@ -50,19 +50,14 @@ class MergePathsContent implements PathContent, GreedyContent {
|
|||||||
switch (_mergePaths.mode) {
|
switch (_mergePaths.mode) {
|
||||||
case MergePathsMode.merge:
|
case MergePathsMode.merge:
|
||||||
_addPaths();
|
_addPaths();
|
||||||
break;
|
|
||||||
case MergePathsMode.add:
|
case MergePathsMode.add:
|
||||||
_opFirstPathWithRest(PathOperation.union);
|
_opFirstPathWithRest(PathOperation.union);
|
||||||
break;
|
|
||||||
case MergePathsMode.substract:
|
case MergePathsMode.substract:
|
||||||
_opFirstPathWithRest(PathOperation.reverseDifference);
|
_opFirstPathWithRest(PathOperation.reverseDifference);
|
||||||
break;
|
|
||||||
case MergePathsMode.intersect:
|
case MergePathsMode.intersect:
|
||||||
_opFirstPathWithRest(PathOperation.intersect);
|
_opFirstPathWithRest(PathOperation.intersect);
|
||||||
break;
|
|
||||||
case MergePathsMode.excludeIntersections:
|
case MergePathsMode.excludeIntersections:
|
||||||
_opFirstPathWithRest(PathOperation.xor);
|
_opFirstPathWithRest(PathOperation.xor);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return _path;
|
return _path;
|
||||||
|
@ -108,10 +108,8 @@ class PolystarContent implements PathContent, KeyPathElementContent {
|
|||||||
switch (_polystarShape.type) {
|
switch (_polystarShape.type) {
|
||||||
case PolystarShapeType.star:
|
case PolystarShapeType.star:
|
||||||
_createStarPath();
|
_createStarPath();
|
||||||
break;
|
|
||||||
case PolystarShapeType.polygon:
|
case PolystarShapeType.polygon:
|
||||||
_createPolygonPath();
|
_createPolygonPath();
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_path.close();
|
_path.close();
|
||||||
@ -253,7 +251,7 @@ class PolystarContent implements PathContent, KeyPathElementContent {
|
|||||||
_path.moveTo(x, y);
|
_path.moveTo(x, y);
|
||||||
currentAngle += anglePerPoint;
|
currentAngle += anglePerPoint;
|
||||||
|
|
||||||
var numPoints = points.ceil().toDouble();
|
var numPoints = points.toDouble();
|
||||||
for (var i = 0; i < numPoints; i++) {
|
for (var i = 0; i < numPoints; i++) {
|
||||||
previousX = x;
|
previousX = x;
|
||||||
previousY = y;
|
previousY = y;
|
||||||
|
@ -79,7 +79,8 @@ class RepeaterContent
|
|||||||
newContents = newContents.reversed.toList();
|
newContents = newContents.reversed.toList();
|
||||||
|
|
||||||
_contentGroup = ContentGroup.copy(
|
_contentGroup = ContentGroup.copy(
|
||||||
lottieDrawable, layer, 'Repeater', _repeater.hidden, newContents, null);
|
lottieDrawable, layer, 'Repeater', newContents, null,
|
||||||
|
hidden: _repeater.hidden);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -6,6 +6,7 @@ import '../../model/content/shape_data.dart';
|
|||||||
import '../../model/cubic_curve_data.dart';
|
import '../../model/cubic_curve_data.dart';
|
||||||
import '../../model/layer/base_layer.dart';
|
import '../../model/layer/base_layer.dart';
|
||||||
import '../../utils.dart';
|
import '../../utils.dart';
|
||||||
|
import '../../utils/misc.dart';
|
||||||
import '../keyframe/base_keyframe_animation.dart';
|
import '../keyframe/base_keyframe_animation.dart';
|
||||||
import 'content.dart';
|
import 'content.dart';
|
||||||
import 'shape_modifier_content.dart';
|
import 'shape_modifier_content.dart';
|
||||||
@ -168,12 +169,12 @@ class RoundedCornersContent implements ShapeModifierContent {
|
|||||||
var previousCurveData = modifiedCurves[
|
var previousCurveData = modifiedCurves[
|
||||||
floorMod(modifiedCurvesIndex - 1, modifiedCurves.length)];
|
floorMod(modifiedCurvesIndex - 1, modifiedCurves.length)];
|
||||||
var currentCurveData = modifiedCurves[modifiedCurvesIndex];
|
var currentCurveData = modifiedCurves[modifiedCurvesIndex];
|
||||||
previousCurveData.controlPoint2 =
|
previousCurveData.controlPoint2 = Offset(
|
||||||
Offset(previousCurve.vertex.dx, previousCurve.vertex.dy);
|
previousCurve.controlPoint2.dx, previousCurve.controlPoint2.dy);
|
||||||
previousCurveData.vertex =
|
previousCurveData.vertex =
|
||||||
Offset(previousCurve.vertex.dx, previousCurve.vertex.dy);
|
Offset(previousCurve.vertex.dx, previousCurve.vertex.dy);
|
||||||
currentCurveData.controlPoint1 =
|
currentCurveData.controlPoint1 = Offset(
|
||||||
Offset(startingCurve.vertex.dx, startingCurve.vertex.dy);
|
startingCurve.controlPoint1.dx, startingCurve.controlPoint1.dy);
|
||||||
modifiedCurvesIndex++;
|
modifiedCurvesIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -215,22 +216,9 @@ class RoundedCornersContent implements ShapeModifierContent {
|
|||||||
this.shapeData = shapeData =
|
this.shapeData = shapeData =
|
||||||
ShapeData(newCurves, initialPoint: Offset.zero, closed: false);
|
ShapeData(newCurves, initialPoint: Offset.zero, closed: false);
|
||||||
}
|
}
|
||||||
shapeData.setClosed(isClosed);
|
shapeData.isClosed = isClosed;
|
||||||
return shapeData;
|
return shapeData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Copied from the API 24+ AOSP source.
|
static int floorMod(int x, int y) => MiscUtils.floorModInt(x, y);
|
||||||
static int floorMod(int x, int y) {
|
|
||||||
return x - floorDiv(x, y) * y;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Copied from the API 24+ AOSP source.
|
|
||||||
static int floorDiv(int x, int y) {
|
|
||||||
var r = x ~/ y;
|
|
||||||
// if the signs are different and modulo not zero, round down
|
|
||||||
if ((x ^ y) < 0 && (r * y != x)) {
|
|
||||||
r--;
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ class StrokeContent extends BaseStrokeContent {
|
|||||||
BaseKeyframeAnimation<ColorFilter, ColorFilter?>? _colorFilterAnimation;
|
BaseKeyframeAnimation<ColorFilter, ColorFilter?>? _colorFilterAnimation;
|
||||||
|
|
||||||
StrokeContent(
|
StrokeContent(
|
||||||
final LottieDrawable lottieDrawable, BaseLayer layer, ShapeStroke stroke)
|
LottieDrawable lottieDrawable, BaseLayer layer, ShapeStroke stroke)
|
||||||
: name = stroke.name,
|
: name = stroke.name,
|
||||||
_hidden = stroke.hidden,
|
_hidden = stroke.hidden,
|
||||||
_colorAnimation = stroke.color.createAnimation(),
|
_colorAnimation = stroke.color.createAnimation(),
|
||||||
|
@ -4,7 +4,7 @@ import '../../value/keyframe.dart';
|
|||||||
import 'keyframe_animation.dart';
|
import 'keyframe_animation.dart';
|
||||||
|
|
||||||
class ColorKeyframeAnimation extends KeyframeAnimation<Color> {
|
class ColorKeyframeAnimation extends KeyframeAnimation<Color> {
|
||||||
ColorKeyframeAnimation(List<Keyframe<Color>> keyframes) : super(keyframes);
|
ColorKeyframeAnimation(super.keyframes);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Color getValue(Keyframe<Color> keyframe, double keyframeProgress) {
|
Color getValue(Keyframe<Color> keyframe, double keyframeProgress) {
|
||||||
|
@ -3,7 +3,7 @@ import '../../value/keyframe.dart';
|
|||||||
import 'keyframe_animation.dart';
|
import 'keyframe_animation.dart';
|
||||||
|
|
||||||
class DoubleKeyframeAnimation extends KeyframeAnimation<double> {
|
class DoubleKeyframeAnimation extends KeyframeAnimation<double> {
|
||||||
DoubleKeyframeAnimation(List<Keyframe<double>> keyframes) : super(keyframes);
|
DoubleKeyframeAnimation(super.keyframes);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
double getValue(Keyframe<double> keyframe, double keyframeProgress) {
|
double getValue(Keyframe<double> keyframe, double keyframeProgress) {
|
||||||
|
@ -3,7 +3,7 @@ import '../../value/keyframe.dart';
|
|||||||
import 'keyframe_animation.dart';
|
import 'keyframe_animation.dart';
|
||||||
|
|
||||||
class IntegerKeyframeAnimation extends KeyframeAnimation<int> {
|
class IntegerKeyframeAnimation extends KeyframeAnimation<int> {
|
||||||
IntegerKeyframeAnimation(List<Keyframe<int>> keyframes) : super(keyframes);
|
IntegerKeyframeAnimation(super.keyframes);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int getValue(Keyframe<int> keyframe, double keyframeProgress) {
|
int getValue(Keyframe<int> keyframe, double keyframeProgress) {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import '../../value/keyframe.dart';
|
|
||||||
import 'base_keyframe_animation.dart';
|
import 'base_keyframe_animation.dart';
|
||||||
|
|
||||||
abstract class KeyframeAnimation<T extends Object>
|
abstract class KeyframeAnimation<T extends Object>
|
||||||
extends BaseKeyframeAnimation<T, T> {
|
extends BaseKeyframeAnimation<T, T> {
|
||||||
KeyframeAnimation(List<Keyframe<T>> keyframes) : super(keyframes);
|
KeyframeAnimation(super.keyframes);
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,9 @@ class PathKeyframe extends Keyframe<Offset> {
|
|||||||
Path? _path;
|
Path? _path;
|
||||||
final Keyframe<Offset> _pointKeyFrame;
|
final Keyframe<Offset> _pointKeyFrame;
|
||||||
|
|
||||||
PathKeyframe(LottieComposition composition, Keyframe<Offset> keyframe)
|
PathKeyframe(LottieComposition super.composition, Keyframe<Offset> keyframe)
|
||||||
: _pointKeyFrame = keyframe,
|
: _pointKeyFrame = keyframe,
|
||||||
super(composition,
|
super(
|
||||||
startValue: keyframe.startValue,
|
startValue: keyframe.startValue,
|
||||||
endValue: keyframe.endValue,
|
endValue: keyframe.endValue,
|
||||||
interpolator: keyframe.interpolator,
|
interpolator: keyframe.interpolator,
|
||||||
|
@ -7,7 +7,7 @@ class PathKeyframeAnimation extends KeyframeAnimation<Offset> {
|
|||||||
PathKeyframe? _pathMeasureKeyframe;
|
PathKeyframe? _pathMeasureKeyframe;
|
||||||
late PathMetric _pathMeasure;
|
late PathMetric _pathMeasure;
|
||||||
|
|
||||||
PathKeyframeAnimation(List<Keyframe<Offset>> keyframes) : super(keyframes);
|
PathKeyframeAnimation(super.keyframes);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Offset getValue(Keyframe<Offset> keyframe, double keyframeProgress) {
|
Offset getValue(Keyframe<Offset> keyframe, double keyframeProgress) {
|
||||||
|
@ -3,7 +3,7 @@ import '../../value/keyframe.dart';
|
|||||||
import 'keyframe_animation.dart';
|
import 'keyframe_animation.dart';
|
||||||
|
|
||||||
class PointKeyframeAnimation extends KeyframeAnimation<Offset> {
|
class PointKeyframeAnimation extends KeyframeAnimation<Offset> {
|
||||||
PointKeyframeAnimation(List<Keyframe<Offset>> keyframes) : super(keyframes);
|
PointKeyframeAnimation(super.keyframes);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Offset getValue(Keyframe<Offset> keyframe, double keyframeProgress) {
|
Offset getValue(Keyframe<Offset> keyframe, double keyframeProgress) {
|
||||||
|
@ -11,8 +11,7 @@ class ShapeKeyframeAnimation extends BaseKeyframeAnimation<ShapeData, Path> {
|
|||||||
final Path _tempPath = PathFactory.create();
|
final Path _tempPath = PathFactory.create();
|
||||||
List<ShapeModifierContent>? _shapeModifiers;
|
List<ShapeModifierContent>? _shapeModifiers;
|
||||||
|
|
||||||
ShapeKeyframeAnimation(List<Keyframe<ShapeData>> keyframes)
|
ShapeKeyframeAnimation(super.keyframes);
|
||||||
: super(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Path getValue(Keyframe<ShapeData> keyframe, double keyframeProgress) {
|
Path getValue(Keyframe<ShapeData> keyframe, double keyframeProgress) {
|
||||||
|
@ -5,8 +5,7 @@ import '../../value/lottie_value_callback.dart';
|
|||||||
import 'keyframe_animation.dart';
|
import 'keyframe_animation.dart';
|
||||||
|
|
||||||
class TextKeyframeAnimation extends KeyframeAnimation<DocumentData> {
|
class TextKeyframeAnimation extends KeyframeAnimation<DocumentData> {
|
||||||
TextKeyframeAnimation(List<Keyframe<DocumentData>> keyframes)
|
TextKeyframeAnimation(super.keyframes);
|
||||||
: super(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
DocumentData getValue(
|
DocumentData getValue(
|
||||||
@ -53,16 +52,19 @@ class _DocumentDataValueCallback extends LottieValueCallback<DocumentData> {
|
|||||||
? frameInfo.endValue!
|
? frameInfo.endValue!
|
||||||
: frameInfo.startValue!;
|
: frameInfo.startValue!;
|
||||||
return DocumentData(
|
return DocumentData(
|
||||||
text: text,
|
text: text,
|
||||||
fontName: baseDocumentData.fontName,
|
fontName: baseDocumentData.fontName,
|
||||||
size: baseDocumentData.size,
|
size: baseDocumentData.size,
|
||||||
justification: baseDocumentData.justification,
|
justification: baseDocumentData.justification,
|
||||||
tracking: baseDocumentData.tracking,
|
tracking: baseDocumentData.tracking,
|
||||||
lineHeight: baseDocumentData.lineHeight,
|
lineHeight: baseDocumentData.lineHeight,
|
||||||
baselineShift: baseDocumentData.baselineShift,
|
baselineShift: baseDocumentData.baselineShift,
|
||||||
color: baseDocumentData.color,
|
color: baseDocumentData.color,
|
||||||
strokeColor: baseDocumentData.strokeColor,
|
strokeColor: baseDocumentData.strokeColor,
|
||||||
strokeWidth: baseDocumentData.strokeWidth,
|
strokeWidth: baseDocumentData.strokeWidth,
|
||||||
strokeOverFill: baseDocumentData.strokeOverFill);
|
strokeOverFill: baseDocumentData.strokeOverFill,
|
||||||
|
boxPosition: baseDocumentData.boxPosition,
|
||||||
|
boxSize: baseDocumentData.boxSize,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import '../lottie.dart';
|
|||||||
import 'composition.dart';
|
import 'composition.dart';
|
||||||
import 'l.dart';
|
import 'l.dart';
|
||||||
import 'lottie_builder.dart';
|
import 'lottie_builder.dart';
|
||||||
|
import 'providers/lottie_provider.dart';
|
||||||
|
|
||||||
/// A widget to display a loaded [LottieComposition].
|
/// A widget to display a loaded [LottieComposition].
|
||||||
/// The [controller] property allows to specify a custom AnimationController that
|
/// The [controller] property allows to specify a custom AnimationController that
|
||||||
@ -11,8 +12,11 @@ import 'lottie_builder.dart';
|
|||||||
/// automatically and the behavior could be adjusted with the properties [animate],
|
/// automatically and the behavior could be adjusted with the properties [animate],
|
||||||
/// [repeat] and [reverse].
|
/// [repeat] and [reverse].
|
||||||
class Lottie extends StatefulWidget {
|
class Lottie extends StatefulWidget {
|
||||||
|
/// The cache instance for recently loaded Lottie compositions.
|
||||||
|
static LottieCache get cache => sharedLottieCache;
|
||||||
|
|
||||||
const Lottie({
|
const Lottie({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.composition,
|
required this.composition,
|
||||||
this.controller,
|
this.controller,
|
||||||
this.width,
|
this.width,
|
||||||
@ -30,8 +34,7 @@ class Lottie extends StatefulWidget {
|
|||||||
}) : animate = animate ?? true,
|
}) : animate = animate ?? true,
|
||||||
reverse = reverse ?? false,
|
reverse = reverse ?? false,
|
||||||
repeat = repeat ?? true,
|
repeat = repeat ?? true,
|
||||||
addRepaintBoundary = addRepaintBoundary ?? true,
|
addRepaintBoundary = addRepaintBoundary ?? true;
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
/// Creates a widget that displays an [LottieComposition] obtained from an [AssetBundle].
|
/// Creates a widget that displays an [LottieComposition] obtained from an [AssetBundle].
|
||||||
static LottieBuilder asset(
|
static LottieBuilder asset(
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:typed_data';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'composition.dart';
|
import 'composition.dart';
|
||||||
@ -33,16 +32,16 @@ typedef LottieErrorWidgetBuilder = Widget Function(
|
|||||||
/// Several constructors are provided for the various ways that a Lottie file
|
/// Several constructors are provided for the various ways that a Lottie file
|
||||||
/// can be provided:
|
/// can be provided:
|
||||||
///
|
///
|
||||||
/// * [new Lottie], for obtaining a composition from a [LottieProvider].
|
/// * [Lottie], for obtaining a composition from a [LottieProvider].
|
||||||
/// * [new Lottie.asset], for obtaining a Lottie file from an [AssetBundle]
|
/// * [Lottie.asset], for obtaining a Lottie file from an [AssetBundle]
|
||||||
/// using a key.
|
/// using a key.
|
||||||
/// * [new Lottie.network], for obtaining a lottie file from a URL.
|
/// * [Lottie.network], for obtaining a lottie file from a URL.
|
||||||
/// * [new Lottie.file], for obtaining a lottie file from a [File].
|
/// * [Lottie.file], for obtaining a lottie file from a [File].
|
||||||
/// * [new Lottie.memory], for obtaining a lottie file from a [Uint8List].
|
/// * [Lottie.memory], for obtaining a lottie file from a [Uint8List].
|
||||||
///
|
///
|
||||||
class LottieBuilder extends StatefulWidget {
|
class LottieBuilder extends StatefulWidget {
|
||||||
const LottieBuilder({
|
const LottieBuilder({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.lottie,
|
required this.lottie,
|
||||||
this.controller,
|
this.controller,
|
||||||
this.frameRate,
|
this.frameRate,
|
||||||
@ -61,7 +60,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.addRepaintBoundary,
|
this.addRepaintBoundary,
|
||||||
this.filterQuality,
|
this.filterQuality,
|
||||||
this.onWarning,
|
this.onWarning,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
/// 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(
|
||||||
@ -76,7 +75,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.options,
|
this.options,
|
||||||
LottieImageProviderFactory? imageProviderFactory,
|
LottieImageProviderFactory? imageProviderFactory,
|
||||||
this.onLoaded,
|
this.onLoaded,
|
||||||
Key? key,
|
super.key,
|
||||||
this.frameBuilder,
|
this.frameBuilder,
|
||||||
this.errorBuilder,
|
this.errorBuilder,
|
||||||
this.width,
|
this.width,
|
||||||
@ -86,9 +85,8 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.addRepaintBoundary,
|
this.addRepaintBoundary,
|
||||||
this.filterQuality,
|
this.filterQuality,
|
||||||
this.onWarning,
|
this.onWarning,
|
||||||
}) : lottie = NetworkLottie(src,
|
}) : lottie = NetworkLottie(src,
|
||||||
headers: headers, imageProviderFactory: imageProviderFactory),
|
headers: headers, imageProviderFactory: imageProviderFactory);
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
/// Creates a widget that displays an [LottieComposition] obtained from a [File].
|
/// Creates a widget that displays an [LottieComposition] obtained from a [File].
|
||||||
///
|
///
|
||||||
@ -111,7 +109,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.options,
|
this.options,
|
||||||
LottieImageProviderFactory? imageProviderFactory,
|
LottieImageProviderFactory? imageProviderFactory,
|
||||||
this.onLoaded,
|
this.onLoaded,
|
||||||
Key? key,
|
super.key,
|
||||||
this.frameBuilder,
|
this.frameBuilder,
|
||||||
this.errorBuilder,
|
this.errorBuilder,
|
||||||
this.width,
|
this.width,
|
||||||
@ -121,8 +119,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.addRepaintBoundary,
|
this.addRepaintBoundary,
|
||||||
this.filterQuality,
|
this.filterQuality,
|
||||||
this.onWarning,
|
this.onWarning,
|
||||||
}) : lottie = FileLottie(file, imageProviderFactory: imageProviderFactory),
|
}) : lottie = FileLottie(file, imageProviderFactory: imageProviderFactory);
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
/// Creates a widget that displays an [LottieComposition] obtained from an [AssetBundle].
|
/// Creates a widget that displays an [LottieComposition] obtained from an [AssetBundle].
|
||||||
LottieBuilder.asset(
|
LottieBuilder.asset(
|
||||||
@ -136,7 +133,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.options,
|
this.options,
|
||||||
LottieImageProviderFactory? imageProviderFactory,
|
LottieImageProviderFactory? imageProviderFactory,
|
||||||
this.onLoaded,
|
this.onLoaded,
|
||||||
Key? key,
|
super.key,
|
||||||
AssetBundle? bundle,
|
AssetBundle? bundle,
|
||||||
this.frameBuilder,
|
this.frameBuilder,
|
||||||
this.errorBuilder,
|
this.errorBuilder,
|
||||||
@ -148,11 +145,10 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.addRepaintBoundary,
|
this.addRepaintBoundary,
|
||||||
this.filterQuality,
|
this.filterQuality,
|
||||||
this.onWarning,
|
this.onWarning,
|
||||||
}) : lottie = AssetLottie(name,
|
}) : lottie = AssetLottie(name,
|
||||||
bundle: bundle,
|
bundle: bundle,
|
||||||
package: package,
|
package: package,
|
||||||
imageProviderFactory: imageProviderFactory),
|
imageProviderFactory: imageProviderFactory);
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
/// Creates a widget that displays an [LottieComposition] obtained from a [Uint8List].
|
/// Creates a widget that displays an [LottieComposition] obtained from a [Uint8List].
|
||||||
LottieBuilder.memory(
|
LottieBuilder.memory(
|
||||||
@ -167,7 +163,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
LottieImageProviderFactory? imageProviderFactory,
|
LottieImageProviderFactory? imageProviderFactory,
|
||||||
this.onLoaded,
|
this.onLoaded,
|
||||||
this.errorBuilder,
|
this.errorBuilder,
|
||||||
Key? key,
|
super.key,
|
||||||
this.frameBuilder,
|
this.frameBuilder,
|
||||||
this.width,
|
this.width,
|
||||||
this.height,
|
this.height,
|
||||||
@ -176,9 +172,7 @@ class LottieBuilder extends StatefulWidget {
|
|||||||
this.addRepaintBoundary,
|
this.addRepaintBoundary,
|
||||||
this.filterQuality,
|
this.filterQuality,
|
||||||
this.onWarning,
|
this.onWarning,
|
||||||
}) : lottie =
|
}) : lottie = MemoryLottie(bytes, imageProviderFactory: imageProviderFactory);
|
||||||
MemoryLottie(bytes, imageProviderFactory: imageProviderFactory),
|
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
/// The lottie animation to load.
|
/// The lottie animation to load.
|
||||||
/// Example of providers: [AssetLottie], [NetworkLottie], [FileLottie], [MemoryLottie]
|
/// Example of providers: [AssetLottie], [NetworkLottie], [FileLottie], [MemoryLottie]
|
||||||
@ -447,17 +441,22 @@ class _LottieBuilderState extends State<LottieBuilder> {
|
|||||||
void _load() {
|
void _load() {
|
||||||
var provider = widget.lottie;
|
var provider = widget.lottie;
|
||||||
_loadingFuture = widget.lottie.load().then((composition) {
|
_loadingFuture = widget.lottie.load().then((composition) {
|
||||||
if (mounted && widget.lottie == provider) {
|
// LottieProvier.load() can return a Synchronous future and the onLoaded
|
||||||
var onWarning = widget.onWarning;
|
// callback can call setState, so we wrap it in a microtask to avoid an
|
||||||
composition.onWarning = onWarning;
|
// "!_isDirty" error.
|
||||||
if (onWarning != null) {
|
scheduleMicrotask(() {
|
||||||
for (var warning in composition.warnings) {
|
if (mounted && widget.lottie == provider) {
|
||||||
onWarning(warning);
|
var onWarning = widget.onWarning;
|
||||||
|
composition.onWarning = onWarning;
|
||||||
|
if (onWarning != null) {
|
||||||
|
for (var warning in composition.warnings) {
|
||||||
|
onWarning(warning);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
widget.onLoaded?.call(composition);
|
widget.onLoaded?.call(composition);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return composition;
|
return composition;
|
||||||
});
|
});
|
||||||
@ -478,12 +477,14 @@ class _LottieBuilderState extends State<LottieBuilder> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var composition = snapshot.data;
|
var composition = snapshot.data;
|
||||||
|
var animate = widget.animate;
|
||||||
|
animate ??= (composition?.durationFrames ?? 0) > 1.0;
|
||||||
|
|
||||||
Widget result = Lottie(
|
Widget result = Lottie(
|
||||||
composition: composition,
|
composition: composition,
|
||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
frameRate: widget.frameRate,
|
frameRate: widget.frameRate,
|
||||||
animate: widget.animate,
|
animate: animate,
|
||||||
reverse: widget.reverse,
|
reverse: widget.reverse,
|
||||||
repeat: widget.repeat,
|
repeat: widget.repeat,
|
||||||
delegates: widget.delegates,
|
delegates: widget.delegates,
|
||||||
|
@ -5,9 +5,22 @@ import 'lottie_drawable.dart';
|
|||||||
import 'lottie_image_asset.dart';
|
import 'lottie_image_asset.dart';
|
||||||
import 'value_delegate.dart';
|
import 'value_delegate.dart';
|
||||||
|
|
||||||
// TODO(xha): recognize style Bold, Medium, Regular, SemiBold, etc...
|
TextStyle defaultTextStyleDelegate(LottieFontStyle font) {
|
||||||
TextStyle defaultTextStyleDelegate(LottieFontStyle font) =>
|
var style = font.style.toLowerCase();
|
||||||
TextStyle(fontFamily: font.fontFamily);
|
|
||||||
|
var fontStyle = style.contains('italic') ? FontStyle.italic : null;
|
||||||
|
|
||||||
|
FontWeight? fontWeight;
|
||||||
|
if (style.contains('semibold') || style.contains('semi bold')) {
|
||||||
|
fontWeight = FontWeight.w600;
|
||||||
|
} else if (style.contains('bold')) {
|
||||||
|
fontWeight = FontWeight.bold;
|
||||||
|
}
|
||||||
|
return TextStyle(
|
||||||
|
fontFamily: font.fontFamily,
|
||||||
|
fontStyle: fontStyle,
|
||||||
|
fontWeight: fontWeight);
|
||||||
|
}
|
||||||
|
|
||||||
@immutable
|
@immutable
|
||||||
class LottieDelegates {
|
class LottieDelegates {
|
||||||
@ -82,5 +95,5 @@ class LottieDelegates {
|
|||||||
values == other.values;
|
values == other.values;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => hashValues(text, textStyle, values);
|
int get hashCode => Object.hash(text, textStyle, values);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
import '../../animation/keyframe/color_keyframe_animation.dart';
|
import '../../animation/keyframe/color_keyframe_animation.dart';
|
||||||
import '../../value/keyframe.dart';
|
|
||||||
import 'base_animatable_value.dart';
|
import 'base_animatable_value.dart';
|
||||||
|
|
||||||
class AnimatableColorValue extends BaseAnimatableValue<Color, Color> {
|
class AnimatableColorValue extends BaseAnimatableValue<Color, Color> {
|
||||||
AnimatableColorValue.fromKeyframes(List<Keyframe<Color>> keyframes)
|
AnimatableColorValue.fromKeyframes(super.keyframes) : super.fromKeyframes();
|
||||||
: super.fromKeyframes(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ColorKeyframeAnimation createAnimation() {
|
ColorKeyframeAnimation createAnimation() {
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import '../../animation/keyframe/double_keyframe_animation.dart';
|
import '../../animation/keyframe/double_keyframe_animation.dart';
|
||||||
import '../../value/keyframe.dart';
|
|
||||||
import 'base_animatable_value.dart';
|
import 'base_animatable_value.dart';
|
||||||
|
|
||||||
class AnimatableDoubleValue extends BaseAnimatableValue<double, double> {
|
class AnimatableDoubleValue extends BaseAnimatableValue<double, double> {
|
||||||
AnimatableDoubleValue() : super.fromValue(0.0);
|
AnimatableDoubleValue() : super.fromValue(0.0);
|
||||||
|
|
||||||
AnimatableDoubleValue.fromKeyframes(List<Keyframe<double>> keyframes)
|
AnimatableDoubleValue.fromKeyframes(super.keyframes) : super.fromKeyframes();
|
||||||
: super.fromKeyframes(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
DoubleKeyframeAnimation createAnimation() {
|
DoubleKeyframeAnimation createAnimation() {
|
||||||
|
@ -7,7 +7,51 @@ class AnimatableGradientColorValue
|
|||||||
extends BaseAnimatableValue<GradientColor, GradientColor> {
|
extends BaseAnimatableValue<GradientColor, GradientColor> {
|
||||||
AnimatableGradientColorValue.fromKeyframes(
|
AnimatableGradientColorValue.fromKeyframes(
|
||||||
List<Keyframe<GradientColor>> keyframes)
|
List<Keyframe<GradientColor>> keyframes)
|
||||||
: super.fromKeyframes(keyframes);
|
: super.fromKeyframes(_ensureInterpolatableKeyframes(keyframes));
|
||||||
|
|
||||||
|
static List<Keyframe<GradientColor>> _ensureInterpolatableKeyframes(
|
||||||
|
List<Keyframe<GradientColor>> keyframes) {
|
||||||
|
for (var i = 0; i < keyframes.length; i++) {
|
||||||
|
keyframes[i] = _ensureInterpolatableKeyframe(keyframes[i]);
|
||||||
|
}
|
||||||
|
return keyframes;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Keyframe<GradientColor> _ensureInterpolatableKeyframe(
|
||||||
|
Keyframe<GradientColor> keyframe) {
|
||||||
|
var startValue = keyframe.startValue;
|
||||||
|
var endValue = keyframe.endValue;
|
||||||
|
if (startValue == null ||
|
||||||
|
endValue == null ||
|
||||||
|
startValue.positions.length == endValue.positions.length) {
|
||||||
|
return keyframe;
|
||||||
|
}
|
||||||
|
var mergedPositions =
|
||||||
|
_mergePositions(startValue.positions, endValue.positions);
|
||||||
|
// The start/end has opacity stops which required adding extra positions in between the existing colors.
|
||||||
|
return keyframe.copyWith(startValue.copyWithPositions(mergedPositions),
|
||||||
|
endValue.copyWithPositions(mergedPositions));
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<double> _mergePositions(
|
||||||
|
List<double> startPositions, List<double> endPositions) {
|
||||||
|
var mergedArray =
|
||||||
|
List<double>.filled(startPositions.length + endPositions.length, 0);
|
||||||
|
mergedArray.setRange(0, startPositions.length, startPositions);
|
||||||
|
mergedArray.setRange(startPositions.length,
|
||||||
|
startPositions.length + endPositions.length, endPositions);
|
||||||
|
mergedArray.sort();
|
||||||
|
var uniqueValues = 0;
|
||||||
|
var lastValue = double.nan;
|
||||||
|
for (var i = 0; i < mergedArray.length; i++) {
|
||||||
|
if (mergedArray[i] != lastValue) {
|
||||||
|
mergedArray[uniqueValues] = mergedArray[i];
|
||||||
|
uniqueValues++;
|
||||||
|
lastValue = mergedArray[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return mergedArray.take(uniqueValues).toList();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
GradientColorKeyframeAnimation createAnimation() {
|
GradientColorKeyframeAnimation createAnimation() {
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import '../../animation/keyframe/base_keyframe_animation.dart';
|
import '../../animation/keyframe/base_keyframe_animation.dart';
|
||||||
import '../../animation/keyframe/integer_keyframe_animation.dart';
|
import '../../animation/keyframe/integer_keyframe_animation.dart';
|
||||||
import '../../value/keyframe.dart';
|
|
||||||
import 'base_animatable_value.dart';
|
import 'base_animatable_value.dart';
|
||||||
|
|
||||||
class AnimatableIntegerValue extends BaseAnimatableValue<int, int> {
|
class AnimatableIntegerValue extends BaseAnimatableValue<int, int> {
|
||||||
AnimatableIntegerValue() : super.fromValue(100);
|
AnimatableIntegerValue() : super.fromValue(100);
|
||||||
|
|
||||||
AnimatableIntegerValue.fromKeyframes(List<Keyframe<int>> keyframes)
|
AnimatableIntegerValue.fromKeyframes(super.keyframes) : super.fromKeyframes();
|
||||||
: super.fromKeyframes(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BaseKeyframeAnimation<int, int> createAnimation() {
|
BaseKeyframeAnimation<int, int> createAnimation() {
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
import '../../animation/keyframe/point_keyframe_animation.dart';
|
import '../../animation/keyframe/point_keyframe_animation.dart';
|
||||||
import '../../value/keyframe.dart';
|
|
||||||
import 'base_animatable_value.dart';
|
import 'base_animatable_value.dart';
|
||||||
|
|
||||||
class AnimatablePointValue extends BaseAnimatableValue<Offset, Offset> {
|
class AnimatablePointValue extends BaseAnimatableValue<Offset, Offset> {
|
||||||
AnimatablePointValue.fromKeyframes(List<Keyframe<Offset>> keyframes)
|
AnimatablePointValue.fromKeyframes(super.keyframes) : super.fromKeyframes();
|
||||||
: super.fromKeyframes(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
PointKeyframeAnimation createAnimation() {
|
PointKeyframeAnimation createAnimation() {
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
import '../../animation/keyframe/base_keyframe_animation.dart';
|
import '../../animation/keyframe/base_keyframe_animation.dart';
|
||||||
import '../../animation/keyframe/point_keyframe_animation.dart';
|
import '../../animation/keyframe/point_keyframe_animation.dart';
|
||||||
import '../../value/keyframe.dart';
|
|
||||||
import 'base_animatable_value.dart';
|
import 'base_animatable_value.dart';
|
||||||
|
|
||||||
class AnimatableScaleValue extends BaseAnimatableValue<Offset, Offset> {
|
class AnimatableScaleValue extends BaseAnimatableValue<Offset, Offset> {
|
||||||
AnimatableScaleValue.one() : this(const Offset(1, 1));
|
AnimatableScaleValue.one() : this(const Offset(1, 1));
|
||||||
|
|
||||||
AnimatableScaleValue(Offset value) : super.fromValue(value);
|
AnimatableScaleValue(super.value) : super.fromValue();
|
||||||
|
|
||||||
AnimatableScaleValue.fromKeyframes(List<Keyframe<Offset>> keyframes)
|
AnimatableScaleValue.fromKeyframes(super.keyframes) : super.fromKeyframes();
|
||||||
: super.fromKeyframes(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BaseKeyframeAnimation<Offset, Offset> createAnimation() {
|
BaseKeyframeAnimation<Offset, Offset> createAnimation() {
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
import '../../animation/keyframe/shape_keyframe_animation.dart';
|
import '../../animation/keyframe/shape_keyframe_animation.dart';
|
||||||
import '../../value/keyframe.dart';
|
|
||||||
import '../content/shape_data.dart';
|
import '../content/shape_data.dart';
|
||||||
import 'base_animatable_value.dart';
|
import 'base_animatable_value.dart';
|
||||||
|
|
||||||
class AnimatableShapeValue extends BaseAnimatableValue<ShapeData, Path> {
|
class AnimatableShapeValue extends BaseAnimatableValue<ShapeData, Path> {
|
||||||
AnimatableShapeValue.fromKeyframes(List<Keyframe<ShapeData>> keyframes)
|
AnimatableShapeValue.fromKeyframes(super.keyframes) : super.fromKeyframes();
|
||||||
: super.fromKeyframes(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ShapeKeyframeAnimation createAnimation() {
|
ShapeKeyframeAnimation createAnimation() {
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import '../../animation/keyframe/text_keyframe_animation.dart';
|
import '../../animation/keyframe/text_keyframe_animation.dart';
|
||||||
import '../../value/keyframe.dart';
|
|
||||||
import '../document_data.dart';
|
import '../document_data.dart';
|
||||||
import 'base_animatable_value.dart';
|
import 'base_animatable_value.dart';
|
||||||
|
|
||||||
class AnimatableTextFrame
|
class AnimatableTextFrame
|
||||||
extends BaseAnimatableValue<DocumentData, DocumentData> {
|
extends BaseAnimatableValue<DocumentData, DocumentData> {
|
||||||
AnimatableTextFrame.fromKeyframes(List<Keyframe<DocumentData>> keyframes)
|
AnimatableTextFrame.fromKeyframes(super.keyframes) : super.fromKeyframes();
|
||||||
: super.fromKeyframes(keyframes);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TextKeyframeAnimation createAnimation() {
|
TextKeyframeAnimation createAnimation() {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
import '../../utils/collection.dart';
|
||||||
import '../../utils/gamma_evaluator.dart';
|
import '../../utils/gamma_evaluator.dart';
|
||||||
|
|
||||||
class GradientColor {
|
class GradientColor {
|
||||||
@ -21,4 +22,33 @@ class GradientColor {
|
|||||||
GammaEvaluator.evaluate(progress, gc1.colors[i], gc2.colors[i]);
|
GammaEvaluator.evaluate(progress, gc1.colors[i], gc2.colors[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GradientColor copyWithPositions(List<double> positions) {
|
||||||
|
var colors = List<Color>.filled(positions.length, const Color(0x00000000));
|
||||||
|
for (var i = 0; i < positions.length; i++) {
|
||||||
|
colors[i] = _getColorForPosition(positions[i]);
|
||||||
|
}
|
||||||
|
return GradientColor(positions, colors);
|
||||||
|
}
|
||||||
|
|
||||||
|
Color _getColorForPosition(double position) {
|
||||||
|
var existingIndex = binarySearch(positions, position);
|
||||||
|
if (existingIndex >= 0) {
|
||||||
|
return colors[existingIndex];
|
||||||
|
}
|
||||||
|
// binarySearch returns -insertionPoint - 1 if it is not found.
|
||||||
|
var insertionPoint = -(existingIndex + 1);
|
||||||
|
if (insertionPoint == 0) {
|
||||||
|
return colors[0];
|
||||||
|
} else if (insertionPoint == colors.length - 1) {
|
||||||
|
return colors[colors.length - 1];
|
||||||
|
}
|
||||||
|
var startPosition = positions[insertionPoint - 1];
|
||||||
|
var endPosition = positions[insertionPoint];
|
||||||
|
var startColor = colors[insertionPoint - 1];
|
||||||
|
var endColor = colors[insertionPoint];
|
||||||
|
|
||||||
|
var fraction = (position - startPosition) / (endPosition - startPosition);
|
||||||
|
return GammaEvaluator.evaluate(fraction, startColor, endColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,12 @@ import '../cubic_curve_data.dart';
|
|||||||
class ShapeData {
|
class ShapeData {
|
||||||
final List<CubicCurveData> curves;
|
final List<CubicCurveData> curves;
|
||||||
Offset _initialPoint;
|
Offset _initialPoint;
|
||||||
bool _closed;
|
bool isClosed;
|
||||||
|
|
||||||
ShapeData(List<CubicCurveData> curves, {Offset? initialPoint, bool? closed})
|
ShapeData(List<CubicCurveData> curves, {Offset? initialPoint, bool? closed})
|
||||||
: curves = curves.toList(),
|
: curves = curves.toList(),
|
||||||
_initialPoint = initialPoint ?? Offset.zero,
|
_initialPoint = initialPoint ?? Offset.zero,
|
||||||
_closed = closed ?? false;
|
isClosed = closed ?? false;
|
||||||
|
|
||||||
ShapeData.empty() : this([]);
|
ShapeData.empty() : this([]);
|
||||||
|
|
||||||
@ -22,17 +22,9 @@ class ShapeData {
|
|||||||
return _initialPoint;
|
return _initialPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setClosed(bool closed) {
|
|
||||||
_closed = closed;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool get isClosed {
|
|
||||||
return _closed;
|
|
||||||
}
|
|
||||||
|
|
||||||
void interpolateBetween(
|
void interpolateBetween(
|
||||||
ShapeData shapeData1, ShapeData shapeData2, double percentage) {
|
ShapeData shapeData1, ShapeData shapeData2, double percentage) {
|
||||||
_closed = shapeData1.isClosed || shapeData2.isClosed;
|
isClosed = shapeData1.isClosed || shapeData2.isClosed;
|
||||||
|
|
||||||
if (shapeData1.curves.length != shapeData2.curves.length) {
|
if (shapeData1.curves.length != shapeData2.curves.length) {
|
||||||
// TODO(xha): decide what to do? We don't have access to the LottieDrawble
|
// TODO(xha): decide what to do? We don't have access to the LottieDrawble
|
||||||
@ -86,7 +78,7 @@ class ShapeData {
|
|||||||
String toString() {
|
String toString() {
|
||||||
return 'ShapeData{'
|
return 'ShapeData{'
|
||||||
'numCurves=${curves.length}'
|
'numCurves=${curves.length}'
|
||||||
'closed=$_closed'
|
'closed=$isClosed'
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,27 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
enum Justification { leftAlign, rightAlign, center }
|
enum Justification { leftAlign, rightAlign, center }
|
||||||
|
|
||||||
|
@immutable
|
||||||
class DocumentData {
|
class DocumentData {
|
||||||
final String text;
|
final String text;
|
||||||
final String? fontName;
|
final String? fontName;
|
||||||
final double size;
|
final double size;
|
||||||
final Justification justification;
|
final Justification justification;
|
||||||
final int tracking;
|
final int tracking;
|
||||||
|
|
||||||
|
/// Extra space in between lines. */
|
||||||
final double lineHeight;
|
final double lineHeight;
|
||||||
final double baselineShift;
|
final double baselineShift;
|
||||||
final Color color;
|
final Color color;
|
||||||
final Color strokeColor;
|
final Color strokeColor;
|
||||||
final double strokeWidth;
|
final double strokeWidth;
|
||||||
final bool strokeOverFill;
|
final bool strokeOverFill;
|
||||||
|
final Offset? boxPosition;
|
||||||
|
final Offset? boxSize;
|
||||||
|
|
||||||
DocumentData({
|
const DocumentData({
|
||||||
required this.text,
|
required this.text,
|
||||||
this.fontName,
|
this.fontName,
|
||||||
required this.size,
|
required this.size,
|
||||||
@ -27,22 +33,27 @@ class DocumentData {
|
|||||||
required this.strokeColor,
|
required this.strokeColor,
|
||||||
required this.strokeWidth,
|
required this.strokeWidth,
|
||||||
required this.strokeOverFill,
|
required this.strokeOverFill,
|
||||||
|
required this.boxPosition,
|
||||||
|
required this.boxSize,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
return hashValues(
|
return Object.hash(
|
||||||
text,
|
text,
|
||||||
fontName,
|
fontName,
|
||||||
size,
|
size,
|
||||||
justification.index,
|
justification.index,
|
||||||
tracking,
|
tracking,
|
||||||
lineHeight,
|
lineHeight,
|
||||||
baselineShift,
|
baselineShift,
|
||||||
color,
|
color,
|
||||||
strokeColor,
|
strokeColor,
|
||||||
strokeWidth,
|
strokeWidth,
|
||||||
strokeOverFill);
|
strokeOverFill,
|
||||||
|
boxPosition,
|
||||||
|
boxSize,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -60,5 +71,7 @@ class DocumentData {
|
|||||||
color == other.color &&
|
color == other.color &&
|
||||||
strokeColor == other.strokeColor &&
|
strokeColor == other.strokeColor &&
|
||||||
strokeWidth == other.strokeWidth &&
|
strokeWidth == other.strokeWidth &&
|
||||||
strokeOverFill == other.strokeOverFill;
|
strokeOverFill == other.strokeOverFill &&
|
||||||
|
boxPosition == other.boxPosition &&
|
||||||
|
boxSize == other.boxSize;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'content/shape_group.dart';
|
import 'content/shape_group.dart';
|
||||||
|
|
||||||
|
@immutable
|
||||||
class FontCharacter {
|
class FontCharacter {
|
||||||
static int hashFor(String character, String fontFamily, String style) {
|
static int hashFor(String character, String fontFamily, String style) {
|
||||||
var result = 0;
|
var result = character.hashCode;
|
||||||
result = 31 * result + character.hashCode;
|
|
||||||
result = 31 * result + fontFamily.hashCode;
|
result = 31 * result + fontFamily.hashCode;
|
||||||
result = 31 * result + style.hashCode;
|
result = 31 * result + style.hashCode;
|
||||||
return result;
|
return result;
|
||||||
@ -16,7 +17,7 @@ class FontCharacter {
|
|||||||
final String style;
|
final String style;
|
||||||
final String fontFamily;
|
final String fontFamily;
|
||||||
|
|
||||||
FontCharacter(
|
const FontCharacter(
|
||||||
{required this.shapes,
|
{required this.shapes,
|
||||||
required this.character,
|
required this.character,
|
||||||
required this.size,
|
required this.size,
|
||||||
|
@ -363,7 +363,6 @@ abstract class BaseLayer implements DrawingContent, KeyPathElement {
|
|||||||
_contentPaint.setAlpha(255);
|
_contentPaint.setAlpha(255);
|
||||||
canvas.drawRect(bounds, _contentPaint);
|
canvas.drawRect(bounds, _contentPaint);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case MaskMode.maskModeAdd:
|
case MaskMode.maskModeAdd:
|
||||||
if (mask.isInverted) {
|
if (mask.isInverted) {
|
||||||
_applyInvertedAddMask(
|
_applyInvertedAddMask(
|
||||||
@ -372,7 +371,6 @@ abstract class BaseLayer implements DrawingContent, KeyPathElement {
|
|||||||
_applyAddMask(
|
_applyAddMask(
|
||||||
canvas, matrix, mask, maskAnimation, opacityAnimation);
|
canvas, matrix, mask, maskAnimation, opacityAnimation);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case MaskMode.maskModeSubstract:
|
case MaskMode.maskModeSubstract:
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
_contentPaint.color = const ui.Color(0xFF000000);
|
_contentPaint.color = const ui.Color(0xFF000000);
|
||||||
@ -385,7 +383,6 @@ abstract class BaseLayer implements DrawingContent, KeyPathElement {
|
|||||||
_applySubtractMask(
|
_applySubtractMask(
|
||||||
canvas, matrix, mask, maskAnimation, opacityAnimation);
|
canvas, matrix, mask, maskAnimation, opacityAnimation);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case MaskMode.maskModeIntersect:
|
case MaskMode.maskModeIntersect:
|
||||||
if (mask.isInverted) {
|
if (mask.isInverted) {
|
||||||
_applyInvertedIntersectMask(
|
_applyInvertedIntersectMask(
|
||||||
@ -394,7 +391,6 @@ abstract class BaseLayer implements DrawingContent, KeyPathElement {
|
|||||||
_applyIntersectMask(
|
_applyIntersectMask(
|
||||||
canvas, bounds, matrix, mask, maskAnimation, opacityAnimation);
|
canvas, bounds, matrix, mask, maskAnimation, opacityAnimation);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
L.beginSection('Layer#restoreLayer');
|
L.beginSection('Layer#restoreLayer');
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user