Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
fe0032a6c2 | |||
b0bc35196e | |||
0600c44384 |
5
.github/workflows/publish-on-pub.yaml
vendored
@ -15,13 +15,14 @@ jobs:
|
||||
- run: flutter pub run tool/publish/check_version.dart ${GITHUB_REF}
|
||||
- name: Setup credentials
|
||||
run: |
|
||||
cat <<EOF > $PUB_CACHE/credentials.json
|
||||
mkdir -p $XDG_CONFIG_HOME/dart
|
||||
cat <<EOF > $XDG_CONFIG_HOME/dart/pub-credentials.json
|
||||
{
|
||||
"accessToken":"${{ secrets.OAUTH_ACCESS_TOKEN }}",
|
||||
"refreshToken":"${{ secrets.OAUTH_REFRESH_TOKEN }}",
|
||||
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token",
|
||||
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
|
||||
"expiration": 1580681402856
|
||||
"expiration": 1691492965565
|
||||
}
|
||||
EOF
|
||||
- name: Publish package
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 2.6.0
|
||||
- Accept `List<int>` instead of `Uint8List` in `LottieComposition.fromBytes`
|
||||
- Stroke line cap defaults to butt instead of square
|
||||
|
||||
## 2.5.0
|
||||
- Add layer-level opacity option to LottieOptions
|
||||
- Fix TextLayer opacity calculation
|
||||
|
5855
example/assets/Tests/DefaultLineJoinCap.json
Normal file
@ -161,7 +161,7 @@ packages:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.5.0"
|
||||
version: "2.6.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -206,42 +206,42 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_android
|
||||
sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86"
|
||||
sha256: "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.27"
|
||||
version: "2.1.0"
|
||||
path_provider_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_foundation
|
||||
sha256: "916731ccbdce44d545414dd9961f26ba5fbaa74bcbb55237d8e65a623a8c7297"
|
||||
sha256: "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.4"
|
||||
version: "2.3.0"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_linux
|
||||
sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57
|
||||
sha256: ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.11"
|
||||
version: "2.2.0"
|
||||
path_provider_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_platform_interface
|
||||
sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec"
|
||||
sha256: bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.6"
|
||||
version: "2.1.0"
|
||||
path_provider_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_windows
|
||||
sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96"
|
||||
sha256: ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.7"
|
||||
version: "2.2.0"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -254,10 +254,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
|
||||
sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.1.5"
|
||||
pointycastle:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -339,10 +339,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: dfdf0136e0aa7a1b474ea133e67cb0154a0acd2599c4f3ada3b49d38d38793ee
|
||||
sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.5"
|
||||
version: "5.0.6"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -41,7 +41,7 @@ class LottieComposition {
|
||||
name: name, imageProviderFactory: imageProviderFactory);
|
||||
}
|
||||
|
||||
static Future<LottieComposition> fromBytes(Uint8List bytes,
|
||||
static Future<LottieComposition> fromBytes(List<int> bytes,
|
||||
{String? name, LottieImageProviderFactory? imageProviderFactory}) async {
|
||||
Archive? archive;
|
||||
if (bytes[0] == 0x50 && bytes[1] == 0x4B) {
|
||||
|
@ -18,7 +18,7 @@ ui.StrokeCap lineCapTypeToPaintCap(LineCapType? cap) {
|
||||
return ui.StrokeCap.round;
|
||||
case LineCapType.unknown:
|
||||
case null:
|
||||
return ui.StrokeCap.square;
|
||||
return ui.StrokeCap.butt;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
|
||||
class Buffer {
|
||||
Buffer(this.buffer);
|
||||
|
||||
final Uint8List buffer;
|
||||
final List<int> buffer;
|
||||
int _start = 0, _size = 0;
|
||||
int get size => _size;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
import 'buffer.dart';
|
||||
import 'json_scope.dart';
|
||||
import 'json_utf8_reader.dart';
|
||||
@ -167,7 +166,7 @@ abstract class JsonReader {
|
||||
bool failOnUnknown = false;
|
||||
|
||||
/// Returns a new instance that reads UTF-8 encoded JSON from {@code source}.
|
||||
static JsonReader fromBytes(Uint8List source) {
|
||||
static JsonReader fromBytes(List<int> source) {
|
||||
return JsonUtf8Reader(Buffer(source));
|
||||
}
|
||||
|
||||
|
@ -1,189 +0,0 @@
|
||||
import 'dart:ui';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class DebugPath extends Path {
|
||||
void _log(String methodName) {
|
||||
debugPrint('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);
|
||||
}
|
||||
}
|
18
pubspec.lock
@ -5,18 +5,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: "0816708f5fbcacca324d811297153fe3c8e047beb5c6752e12292d2974c17045"
|
||||
sha256: "58826e40314219b223f4723dd4205845040161cdc2df3e6a1cdceed5d8165084"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "62.0.0"
|
||||
version: "63.0.0"
|
||||
analyzer:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "21862995c9932cd082f89d72ae5f5e2c110d1a0204ad06e4ebaee8307b76b834"
|
||||
sha256: f85566ec7b3d25cbea60f7dd4f157c5025f2f19233ca4feeed33b616c78a26a3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
version: "6.1.0"
|
||||
archive:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -89,14 +89,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
dart_internal:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dart_internal
|
||||
sha256: dae3976f383beddcfcd07ad5291a422df2c8c0a8a03c52cda63ac7b4f26e0f4e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.8"
|
||||
dart_style:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
@ -305,5 +297,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
sdks:
|
||||
dart: ">=3.0.0 <3.2.0"
|
||||
dart: ">=3.0.0 <4.0.0"
|
||||
flutter: ">=3.10.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: lottie
|
||||
description: Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
|
||||
version: 2.5.0
|
||||
version: 2.6.0
|
||||
repository: https://github.com/xvrh/lottie-flutter
|
||||
|
||||
environment:
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
test/goldens/all/Tests/defaultlinejoincap.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |