Skip to content

Commit 97729b2

Browse files
committed
Flutter 3.27
1 parent 7e4d1d3 commit 97729b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+96
-90
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.3.0
2+
- Requires Flutter 3.27 and fix lints.
3+
14
## 3.2.1
25
- Add conditional imports to prevent importing `dart:io` on Web targets
36

example/lib/examples/draw_cache.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart' hide Image;
33
import 'package:flutter/material.dart' as material;
44
import 'package:lottie/lottie.dart';
55

6-
/// This example shows how to cache the animation as a List<Image>.
6+
/// This example shows how to cache the animation as a `List<Image>`.
77
/// After the initial cache of each frame, drawing the animation is almost free
88
/// in term of CPU usage.
99
/// The animation will run at a specific framerate (not FrameRate.max) and specific size

example/lib/main_app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class _Item extends StatelessWidget {
7878
borderRadius: const BorderRadius.all(Radius.circular(10)),
7979
boxShadow: [
8080
BoxShadow(
81-
color: Colors.black.withOpacity(0.1),
81+
color: Colors.black.withValues(alpha: 0.1),
8282
offset: const Offset(2, 2),
8383
blurRadius: 5)
8484
]),

example/pubspec.lock

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ packages:
4545
dependency: "direct main"
4646
description:
4747
name: collection
48-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
48+
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "1.18.0"
51+
version: "1.19.0"
5252
convert:
5353
dependency: transitive
5454
description:
@@ -119,26 +119,26 @@ packages:
119119
dependency: transitive
120120
description:
121121
name: http_parser
122-
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
122+
sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360"
123123
url: "https://pub.dev"
124124
source: hosted
125-
version: "4.0.2"
125+
version: "4.1.1"
126126
leak_tracker:
127127
dependency: transitive
128128
description:
129129
name: leak_tracker
130-
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
130+
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
131131
url: "https://pub.dev"
132132
source: hosted
133-
version: "10.0.5"
133+
version: "10.0.7"
134134
leak_tracker_flutter_testing:
135135
dependency: transitive
136136
description:
137137
name: leak_tracker_flutter_testing
138-
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
138+
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
139139
url: "https://pub.dev"
140140
source: hosted
141-
version: "3.0.5"
141+
version: "3.0.8"
142142
leak_tracker_testing:
143143
dependency: transitive
144144
description:
@@ -151,10 +151,10 @@ packages:
151151
dependency: transitive
152152
description:
153153
name: lints
154-
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
154+
sha256: "4a16b3f03741e1252fda5de3ce712666d010ba2122f8e912c94f9f7b90e1a4c3"
155155
url: "https://pub.dev"
156156
source: hosted
157-
version: "5.0.0"
157+
version: "5.1.0"
158158
logging:
159159
dependency: "direct main"
160160
description:
@@ -169,7 +169,7 @@ packages:
169169
path: ".."
170170
relative: true
171171
source: path
172-
version: "3.2.1"
172+
version: "3.3.0"
173173
matcher:
174174
dependency: transitive
175175
description:
@@ -222,10 +222,10 @@ packages:
222222
dependency: transitive
223223
description:
224224
name: path_provider_android
225-
sha256: "8c4967f8b7cb46dc914e178daa29813d83ae502e0529d7b0478330616a691ef7"
225+
sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2"
226226
url: "https://pub.dev"
227227
source: hosted
228-
version: "2.2.14"
228+
version: "2.2.15"
229229
path_provider_foundation:
230230
dependency: transitive
231231
description:
@@ -278,10 +278,10 @@ packages:
278278
dependency: "direct dev"
279279
description:
280280
name: shelf
281-
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
281+
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
282282
url: "https://pub.dev"
283283
source: hosted
284-
version: "1.4.1"
284+
version: "1.4.2"
285285
shelf_static:
286286
dependency: "direct dev"
287287
description:
@@ -294,7 +294,7 @@ packages:
294294
dependency: transitive
295295
description: flutter
296296
source: sdk
297-
version: "0.0.99"
297+
version: "0.0.0"
298298
source_span:
299299
dependency: transitive
300300
description:
@@ -307,10 +307,10 @@ packages:
307307
dependency: transitive
308308
description:
309309
name: stack_trace
310-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
310+
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
311311
url: "https://pub.dev"
312312
source: hosted
313-
version: "1.11.1"
313+
version: "1.12.0"
314314
stream_channel:
315315
dependency: transitive
316316
description:
@@ -323,10 +323,10 @@ packages:
323323
dependency: transitive
324324
description:
325325
name: string_scanner
326-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
326+
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
327327
url: "https://pub.dev"
328328
source: hosted
329-
version: "1.2.0"
329+
version: "1.3.0"
330330
term_glyph:
331331
dependency: transitive
332332
description:
@@ -339,10 +339,10 @@ packages:
339339
dependency: transitive
340340
description:
341341
name: test_api
342-
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
342+
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
343343
url: "https://pub.dev"
344344
source: hosted
345-
version: "0.7.2"
345+
version: "0.7.3"
346346
typed_data:
347347
dependency: transitive
348348
description:
@@ -363,10 +363,10 @@ packages:
363363
dependency: transitive
364364
description:
365365
name: vm_service
366-
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
366+
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
367367
url: "https://pub.dev"
368368
source: hosted
369-
version: "14.2.5"
369+
version: "14.3.0"
370370
web:
371371
dependency: transitive
372372
description:
@@ -384,5 +384,5 @@ packages:
384384
source: hosted
385385
version: "1.1.0"
386386
sdks:
387-
dart: ">=3.5.0 <4.0.0"
388-
flutter: ">=3.24.0"
387+
dart: ">=3.6.0 <4.0.0"
388+
flutter: ">=3.27.0"

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ publish_to: none
55
version: 2.7.0+1
66

77
environment:
8-
sdk: "^3.2.0"
8+
sdk: "^3.6.0"
99

1010
dependencies:
1111
collection:

lib/src/animation/content/stroke_content.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class StrokeContent extends BaseStrokeContent {
3838
if (_hidden) {
3939
return;
4040
}
41-
paint.color = _colorAnimation.value.withAlpha(paint.color.alpha);
41+
paint.color = _colorAnimation.value.withAlpha((paint.color.a * 255).toInt());
4242
if (_colorFilterAnimation != null) {
4343
paint.colorFilter = _colorFilterAnimation!.value;
4444
}

lib/src/animation/keyframe/base_keyframe_animation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import '../../l.dart';
33
import '../../value/keyframe.dart';
44
import '../../value/lottie_value_callback.dart';
55

6-
/// @param <K> Keyframe type
7-
/// @param <A> Animation type
6+
/// @param K Keyframe type
7+
/// @param A Animation type
88
abstract class BaseKeyframeAnimation<K extends Object, A extends Object?> {
99
// This is not a Set because we don't want to create an iterator object on every setProgress.
1010
final listeners = <void Function()>[];

lib/src/animation/keyframe/drop_shadow_keyframe_animation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ class DropShadowKeyframeAnimation {
6969
if (callback != null) {
7070
_color.setValueCallback(_createCallback(
7171
callback, (c) => c?.color ?? const Color(0xff000000)));
72-
_opacity.setValueCallback(
73-
_createCallback(callback, (c) => c?.color.alpha.toDouble() ?? 255));
72+
_opacity
73+
.setValueCallback(_createCallback(callback, (c) => c?.color.a ?? 1));
7474
_direction.setValueCallback(
7575
_createCallback(callback, (c) => c?.direction ?? 0));
7676
_distance

lib/src/model/layer/solid_layer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SolidLayer extends BaseLayer {
2323
@override
2424
void drawLayer(Canvas canvas, Matrix4 parentMatrix,
2525
{required int parentAlpha}) {
26-
var backgroundAlpha = layerModel.solidColor.alpha;
26+
var backgroundAlpha = layerModel.solidColor.a;
2727
if (backgroundAlpha == 0) {
2828
return;
2929
}
@@ -33,7 +33,7 @@ class SolidLayer extends BaseLayer {
3333
var opacity = transform.opacity?.value ?? 100;
3434
var alpha = (parentAlpha /
3535
255.0 *
36-
(backgroundAlpha / 255.0 * opacity / 100.0) *
36+
(backgroundAlpha * opacity / 100.0) *
3737
255.0)
3838
.round();
3939
paint.setAlpha(alpha);

lib/src/model/layer/text_layer.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class TextLayer extends BaseLayer {
120120
} else {
121121
fillPaintColor = documentData.color;
122122
}
123-
_fillPaint.color = fillPaintColor.withAlpha(_fillPaint.color.alpha);
123+
_fillPaint.color = fillPaintColor.withValues(alpha: _fillPaint.color.a);
124124

125125
Color strokePaintColor;
126126
if (_strokeColorCallbackAnimation != null) {
@@ -130,7 +130,7 @@ class TextLayer extends BaseLayer {
130130
} else {
131131
strokePaintColor = documentData.strokeColor;
132132
}
133-
_strokePaint.color = strokePaintColor.withAlpha(_strokePaint.color.alpha);
133+
_strokePaint.color = strokePaintColor.withValues(alpha: _strokePaint.color.a);
134134

135135
var opacity = transform.opacity?.value ?? 100;
136136
var alpha = opacity * 255 / 100 * parentAlpha ~/ 255;
@@ -418,7 +418,7 @@ class TextLayer extends BaseLayer {
418418
}
419419

420420
void _drawGlyph(Path path, Paint paint, Canvas canvas) {
421-
if (paint.color.alpha == 0) {
421+
if (paint.color.a == 0) {
422422
return;
423423
}
424424
if (paint.style == PaintingStyle.stroke && paint.strokeWidth == 0) {
@@ -440,7 +440,7 @@ class TextLayer extends BaseLayer {
440440

441441
void _drawCharacter(
442442
String character, TextStyle textStyle, Paint paint, Canvas canvas) {
443-
if (paint.color.alpha == 0) {
443+
if (paint.color.a == 0) {
444444
return;
445445
}
446446
if (paint.style == PaintingStyle.stroke && paint.strokeWidth == 0) {

0 commit comments

Comments
 (0)