Compare commits

...

3 Commits

82 changed files with 272 additions and 258 deletions

View File

@ -11,7 +11,7 @@ jobs:
strategy: strategy:
matrix: matrix:
flutter: ['stable'] flutter: ['stable']
runs-on: macos-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: subosito/flutter-action@v1 - uses: subosito/flutter-action@v1
@ -22,9 +22,6 @@ jobs:
- run: flutter pub get - run: flutter pub get
working-directory: example working-directory: example
- run: flutter analyze - run: flutter analyze
- run: flutter test test # https://github.com/flutter/flutter/issues/20907
- run: flutter test test
working-directory: example
- run: flutter pub run tool/prepare_submit.dart - run: flutter pub run tool/prepare_submit.dart
- name: "check for uncommitted changes" - name: "check for uncommitted changes"
run: | run: |

17
.github/workflows/test.yaml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Lottie Flutter
on:
pull_request:
push:
branches:
- master
jobs:
test:
name: Run all tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
uses: docker://cirrusci/flutter:1.22.1
with:
args: sh run_tests.sh

View File

@ -1,3 +1,6 @@
## [0.7.0+1]
- Fix Flutter Web compilation error
## [0.7.0] ## [0.7.0]
- Performance improvement for complex animations. - Performance improvement for complex animations.

7
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,7 @@
## Run the Golden tests
Run and update the golden tests requires Docker installed.
```shell script
sh update_goldens.sh
```

View File

@ -8,7 +8,7 @@ animations exported as json with [Bodymovin](https://github.com/airbnb/lottie-we
This repository is a unofficial conversion of the [Lottie-android](https://github.com/airbnb/lottie-android) library in pure Dart. This repository is a unofficial conversion of the [Lottie-android](https://github.com/airbnb/lottie-android) library in pure Dart.
It works on Android, iOS and macOS and web. It works on Android, iOS, macOS, linux, windows and web.
## Usage ## Usage

View File

@ -8,7 +8,7 @@ animations exported as json with [Bodymovin](https://github.com/airbnb/lottie-we
This repository is a unofficial conversion of the [Lottie-android](https://github.com/airbnb/lottie-android) library in pure Dart. This repository is a unofficial conversion of the [Lottie-android](https://github.com/airbnb/lottie-android) library in pure Dart.
It works on Android, iOS and macOS and web. It works on Android, iOS, macOS, linux, windows and web.
## Usage ## Usage

View File

@ -7,14 +7,14 @@ packages:
name: archive name: archive
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.13" version: "2.0.11"
args: args:
dependency: transitive dependency: transitive
description: description:
name: args name: args
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.0" version: "1.5.2"
async: async:
dependency: transitive dependency: transitive
description: description:
@ -70,7 +70,7 @@ packages:
name: crypto name: crypto
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.5" version: "2.1.3"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -150,7 +150,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "0.7.0" version: "0.7.0+1"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@ -213,7 +213,7 @@ packages:
name: pedantic name: pedantic
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.9.2" version: "1.8.0+1"
platform: platform:
dependency: transitive dependency: transitive
description: description:
@ -309,7 +309,7 @@ packages:
name: xdg_directories name: xdg_directories
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.2" version: "0.1.0"
sdks: sdks:
dart: ">=2.10.0-110 <2.11.0" dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0" flutter: ">=1.12.13+hotfix.5 <2.0.0"

View File

@ -22,6 +22,9 @@ void main() {
.replaceAll(' ', '_'); .replaceAll(' ', '_');
testWidgets(description, (tester) async { testWidgets(description, (tester) async {
tester.binding.window.physicalSizeTestValue = Size(500, 400);
tester.binding.window.devicePixelRatioTestValue = 1.0;
var animation = var animation =
AnimationController(vsync: tester, duration: composition.duration); AnimationController(vsync: tester, duration: composition.duration);
if (progress != null) { if (progress != null) {

View File

@ -6,6 +6,9 @@ import 'package:lottie/lottie.dart';
void main() { void main() {
testWidgets('Dynamic test', (tester) async { testWidgets('Dynamic test', (tester) async {
tester.binding.window.physicalSizeTestValue = Size(500, 400);
tester.binding.window.devicePixelRatioTestValue = 1.0;
var composition = await LottieComposition.fromBytes( var composition = await LottieComposition.fromBytes(
File('assets/Tests/DynamicText.json').readAsBytesSync()); File('assets/Tests/DynamicText.json').readAsBytesSync());

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -7,6 +7,9 @@ import 'package:lottie/lottie.dart';
void main() { void main() {
void testGradient(String name, ValueDelegate valueDelegate) { void testGradient(String name, ValueDelegate valueDelegate) {
testWidgets(name, (tester) async { testWidgets(name, (tester) async {
tester.binding.window.physicalSizeTestValue = Size(500, 400);
tester.binding.window.devicePixelRatioTestValue = 1.0;
var composition = await LottieComposition.fromBytes( var composition = await LottieComposition.fromBytes(
File('assets/Tests/DynamicGradient.json').readAsBytesSync()); File('assets/Tests/DynamicGradient.json').readAsBytesSync());

View File

@ -0,0 +1,189 @@
import 'dart:typed_data';
import 'dart:ui';
class DebugPath extends Path {
void _log(String methodName) {
print('Path.$methodName');
}
@override
void addArc(Rect oval, double startAngle, double sweepAngle) {
_log('addArc');
super.addArc(oval, startAngle, sweepAngle);
}
@override
void addOval(Rect oval) {
_log('addOval');
super.addOval(oval);
}
@override
void addPath(Path path, Offset offset, {Float64List matrix4}) {
_log('addPath');
super.addPath(path, offset, matrix4: matrix4);
}
@override
void addPolygon(List<Offset> points, bool close) {
_log('addPolygon');
super.addPolygon(points, close);
}
@override
void addRRect(RRect rrect) {
_log('addRRect');
super.addRRect(rrect);
}
@override
void addRect(Rect rect) {
_log('addRect');
super.addRect(rect);
}
@override
void arcTo(
Rect rect, double startAngle, double sweepAngle, bool forceMoveTo) {
_log('arcTo');
super.arcTo(rect, startAngle, sweepAngle, forceMoveTo);
}
@override
void arcToPoint(Offset arcEnd,
{Radius radius = Radius.zero,
double rotation = 0.0,
bool largeArc = false,
bool clockwise = true}) {
_log('arcToPoint');
super.arcToPoint(arcEnd,
radius: radius,
rotation: rotation,
largeArc: largeArc,
clockwise: clockwise);
}
@override
void close() {
_log('close');
super.close();
}
@override
PathMetrics computeMetrics({bool forceClosed = false}) {
_log('computeMetrics');
return super.computeMetrics();
}
@override
void conicTo(double x1, double y1, double x2, double y2, double w) {
_log('conicTo');
super.conicTo(x1, y1, x2, y2, w);
}
@override
bool contains(Offset point) {
_log('contains');
return super.contains(point);
}
@override
void cubicTo(
double x1, double y1, double x2, double y2, double x3, double y3) {
_log('cubicTo');
super.cubicTo(x1, y1, x2, y2, x3, y3);
}
@override
void extendWithPath(Path path, Offset offset, {Float64List matrix4}) {
_log('extendWithPath');
super.extendWithPath(path, offset, matrix4: matrix4);
}
@override
Rect getBounds() {
_log('getBounds');
return super.getBounds();
}
@override
void lineTo(double x, double y) {
_log('lineTo');
super.lineTo(x, y);
}
@override
void moveTo(double x, double y) {
_log('moveTo');
super.moveTo(x, y);
}
@override
void quadraticBezierTo(double x1, double y1, double x2, double y2) {
_log('quadraticBezierTo');
super.quadraticBezierTo(x1, y1, x2, y2);
}
@override
void relativeArcToPoint(Offset arcEndDelta,
{Radius radius = Radius.zero,
double rotation = 0.0,
bool largeArc = false,
bool clockwise = true}) {
_log('relativeArcToPoint');
super.relativeArcToPoint(arcEndDelta,
radius: radius,
rotation: rotation,
largeArc: largeArc,
clockwise: clockwise);
}
@override
void relativeConicTo(double x1, double y1, double x2, double y2, double w) {
_log('relativeConicTo');
super.relativeConicTo(x1, y1, x2, y2, w);
}
@override
void relativeCubicTo(
double x1, double y1, double x2, double y2, double x3, double y3) {
_log('relativeCubicTo');
super.relativeCubicTo(x1, y1, x2, y2, x3, y3);
}
@override
void relativeLineTo(double dx, double dy) {
_log('relativeLineTo');
super.relativeLineTo(dx, dy);
}
@override
void relativeMoveTo(double dx, double dy) {
_log('relativeMoveTo');
super.relativeMoveTo(dx, dy);
}
@override
void relativeQuadraticBezierTo(double x1, double y1, double x2, double y2) {
_log('relativeQuadraticBezierTo');
super.relativeQuadraticBezierTo(x1, y1, x2, y2);
}
@override
void reset() {
_log('reset');
super.reset();
}
@override
Path shift(Offset offset) {
_log('shift');
return super.shift(offset);
}
@override
Path transform(Float64List matrix4) {
_log('transform');
return super.transform(matrix4);
}
}

View File

@ -1,4 +1,3 @@
import 'dart:typed_data';
import 'dart:ui'; import 'dart:ui';
class PathFactory { class PathFactory {
@ -6,190 +5,3 @@ class PathFactory {
return Path(); return Path();
} }
} }
class DebugPath extends Path {
void _log(String methodName) {
print('Path.$methodName');
}
@override
void addArc(Rect oval, double startAngle, double sweepAngle) {
_log('addArc');
super.addArc(oval, startAngle, sweepAngle);
}
@override
void addOval(Rect oval) {
_log('addOval');
super.addOval(oval);
}
@override
void addPath(Path path, Offset offset, {Float64List matrix4}) {
_log('addPath');
super.addPath(path, offset, matrix4: matrix4);
}
@override
void addPolygon(List<Offset> points, bool close) {
_log('addPolygon');
super.addPolygon(points, close);
}
@override
void addRRect(RRect rrect) {
_log('addRRect');
super.addRRect(rrect);
}
@override
void addRect(Rect rect) {
_log('addRect');
super.addRect(rect);
}
@override
void arcTo(
Rect rect, double startAngle, double sweepAngle, bool forceMoveTo) {
_log('arcTo');
super.arcTo(rect, startAngle, sweepAngle, forceMoveTo);
}
@override
void arcToPoint(Offset arcEnd,
{Radius radius = Radius.zero,
double rotation = 0.0,
bool largeArc = false,
bool clockwise = true}) {
_log('arcToPoint');
super.arcToPoint(arcEnd,
radius: radius,
rotation: rotation,
largeArc: largeArc,
clockwise: clockwise);
}
@override
void close() {
_log('close');
super.close();
}
@override
PathMetrics computeMetrics({bool forceClosed = false}) {
_log('computeMetrics');
return super.computeMetrics();
}
@override
void conicTo(double x1, double y1, double x2, double y2, double w) {
_log('conicTo');
super.conicTo(x1, y1, x2, y2, w);
}
@override
bool contains(Offset point) {
_log('contains');
return super.contains(point);
}
@override
void cubicTo(
double x1, double y1, double x2, double y2, double x3, double y3) {
_log('cubicTo');
super.cubicTo(x1, y1, x2, y2, x3, y3);
}
@override
void extendWithPath(Path path, Offset offset, {Float64List matrix4}) {
_log('extendWithPath');
super.extendWithPath(path, offset, matrix4: matrix4);
}
@override
Rect getBounds() {
_log('getBounds');
return super.getBounds();
}
@override
void lineTo(double x, double y) {
_log('lineTo');
super.lineTo(x, y);
}
@override
void moveTo(double x, double y) {
_log('moveTo');
super.moveTo(x, y);
}
@override
void quadraticBezierTo(double x1, double y1, double x2, double y2) {
_log('quadraticBezierTo');
super.quadraticBezierTo(x1, y1, x2, y2);
}
@override
void relativeArcToPoint(Offset arcEndDelta,
{Radius radius = Radius.zero,
double rotation = 0.0,
bool largeArc = false,
bool clockwise = true}) {
_log('relativeArcToPoint');
super.relativeArcToPoint(arcEndDelta,
radius: radius,
rotation: rotation,
largeArc: largeArc,
clockwise: clockwise);
}
@override
void relativeConicTo(double x1, double y1, double x2, double y2, double w) {
_log('relativeConicTo');
super.relativeConicTo(x1, y1, x2, y2, w);
}
@override
void relativeCubicTo(
double x1, double y1, double x2, double y2, double x3, double y3) {
_log('relativeCubicTo');
super.relativeCubicTo(x1, y1, x2, y2, x3, y3);
}
@override
void relativeLineTo(double dx, double dy) {
_log('relativeLineTo');
super.relativeLineTo(dx, dy);
}
@override
void relativeMoveTo(double dx, double dy) {
_log('relativeMoveTo');
super.relativeMoveTo(dx, dy);
}
@override
void relativeQuadraticBezierTo(double x1, double y1, double x2, double y2) {
_log('relativeQuadraticBezierTo');
super.relativeQuadraticBezierTo(x1, y1, x2, y2);
}
@override
void reset() {
_log('reset');
super.reset();
}
@override
Path shift(Offset offset) {
_log('shift');
return super.shift(offset);
}
@override
Path transform(Float64List matrix4) {
_log('transform');
return super.transform(matrix4);
}
}

View File

@ -7,28 +7,28 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "11.0.0" version: "7.0.0"
analyzer: analyzer:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.40.4" version: "0.39.17"
archive: archive:
dependency: "direct main" dependency: "direct main"
description: description:
name: archive name: archive
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.13" version: "2.0.11"
args: args:
dependency: transitive dependency: transitive
description: description:
name: args name: args
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.0" version: "1.5.2"
async: async:
dependency: transitive dependency: transitive
description: description:
@ -43,27 +43,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0-nullsafety.1" version: "2.1.0-nullsafety.1"
build:
dependency: transitive
description:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.0"
built_collection:
dependency: transitive
description:
name: built_collection
url: "https://pub.dartlang.org"
source: hosted
version: "4.3.2"
built_value:
dependency: transitive
description:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "7.1.0"
characters: characters:
dependency: "direct main" dependency: "direct main"
description: description:
@ -92,13 +71,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0-nullsafety.1" version: "1.1.0-nullsafety.1"
code_builder:
dependency: transitive
description:
name: code_builder
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
collection: collection:
dependency: "direct main" dependency: "direct main"
description: description:
@ -119,14 +91,21 @@ packages:
name: crypto name: crypto
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.5" version: "2.1.3"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.2"
dart_style: dart_style:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: dart_style name: dart_style
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.8" version: "1.3.6"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -134,13 +113,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0-nullsafety.1" version: "1.2.0-nullsafety.1"
fixnum:
dependency: transitive
description:
name: fixnum
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.11"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -158,6 +130,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0+4"
js: js:
dependency: transitive dependency: transitive
description: description:
@ -192,7 +171,7 @@ packages:
name: mockito name: mockito
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.1.3" version: "4.1.1"
node_interop: node_interop:
dependency: transitive dependency: transitive
description: description:
@ -227,7 +206,7 @@ packages:
name: pedantic name: pedantic
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.9.2" version: "1.8.0+1"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: description:
@ -235,25 +214,11 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.4.4" version: "1.4.4"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.99" version: "0.0.99"
source_gen:
dependency: transitive
description:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.7+1"
source_span: source_span:
dependency: transitive dependency: transitive
description: description:

View File

@ -1,6 +1,6 @@
name: lottie name: lottie
description: Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player. description: Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
version: 0.7.0 version: 0.7.0+1
homepage: https://github.com/xvrh/lottie-flutter homepage: https://github.com/xvrh/lottie-flutter
environment: environment:

2
run_tests.sh Normal file
View File

@ -0,0 +1,2 @@
flutter test test
(cd example && flutter test test)

1
update_goldens.sh Normal file
View File

@ -0,0 +1 @@
docker run --rm -it -v "${PWD}":/build --workdir /build cirrusci/flutter:1.22.1 sh update_goldens_inside_docker.sh

View File

@ -0,0 +1,12 @@
PUB_CACHE="$(mktemp -d)"
export PUB_CACHE
COPY_DIR="$(mktemp -d)"
(cd /build && git ls-files | xargs -I '{}' cp -pR --parents '{}' "$COPY_DIR")
cd "$COPY_DIR" || exit
flutter test --update-goldens test
cp -pR test/* /build/test
cd example || exit
flutter test --update-goldens test
cp -pR test/* /build/example/test