File tree Expand file tree Collapse file tree 5 files changed +39
-17
lines changed Expand file tree Collapse file tree 5 files changed +39
-17
lines changed Original file line number Diff line number Diff line change @@ -284,8 +284,8 @@ class Blaze {
284
284
}
285
285
286
286
Future <void > _sendGZip (BlazeMessage msg) async {
287
- channel? .sink.add (
288
- GZipEncoder () .encode (Uint8List .fromList (jsonEncode (msg).codeUnits)));
287
+ channel? .sink.add (const GZipEncoder ()
288
+ .encode (Uint8List .fromList (jsonEncode (msg).codeUnits)));
289
289
}
290
290
291
291
void _disconnect ([bool resetConnectedState = true ]) {
@@ -311,7 +311,7 @@ class Blaze {
311
311
transactions[blazeMessage.id] = transaction;
312
312
d ('sendMessage transactions size: ${transactions .length }' );
313
313
return transaction.run (
314
- () => channel? .sink.add (GZipEncoder ()
314
+ () => channel? .sink.add (const GZipEncoder ()
315
315
.encode (Uint8List .fromList (jsonEncode (blazeMessage).codeUnits))),
316
316
() => null );
317
317
}
@@ -367,7 +367,8 @@ BlazeMessage parseBlazeMessage(List<int> list) =>
367
367
_parseBlazeMessageInternal (list);
368
368
369
369
BlazeMessage _parseBlazeMessageInternal (List <int > message) {
370
- final content = String .fromCharCodes (GZipDecoder ().decodeBytes (message));
370
+ final content =
371
+ String .fromCharCodes (const GZipDecoder ().decodeBytes (message));
371
372
return BlazeMessage .fromJson (jsonDecode (content) as Map <String , dynamic >);
372
373
}
373
374
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import 'dart:async';
2
2
import 'dart:convert' ;
3
3
import 'dart:io' ;
4
4
5
- import 'package:archive/archive.dart' ;
6
5
import 'package:flutter/foundation.dart' ;
7
6
import 'package:path/path.dart' as p;
8
7
import 'package:uuid/uuid.dart' ;
@@ -441,7 +440,7 @@ class TransferProtocolSink implements EventSink<Uint8List> {
441
440
// check hMAC
442
441
final hMac = Uint8List .sublistView (data, offset, offset + 32 );
443
442
final calculatedHMac = builder.hMac;
444
- if (! Uint8ListEquality .equals (hMac, calculatedHMac)) {
443
+ if (! hMac .equals (calculatedHMac)) {
445
444
e ('hMac not match. expected ${base64Encode (hMac )}, actually ${base64Encode (calculatedHMac )}' );
446
445
_sink.addError ('hMac check error' , StackTrace .current);
447
446
return ;
@@ -465,3 +464,16 @@ class TransferProtocolSink implements EventSink<Uint8List> {
465
464
_sink.close ();
466
465
}
467
466
}
467
+
468
+ extension on Uint8List {
469
+ bool equals (Uint8List other) {
470
+ if (length != other.length) {
471
+ return false ;
472
+ }
473
+ var v = 0 ;
474
+ for (var i = 0 ; i < length; i++ ) {
475
+ v | = this [i] ^ other[i];
476
+ }
477
+ return v == 0 ;
478
+ }
479
+ }
Original file line number Diff line number Diff line change @@ -55,19 +55,20 @@ extension SelectedableThrottle<T> on Selectable<T> {
55
55
56
56
@immutable
57
57
class LikeEscapeOperator extends Expression <bool > {
58
- LikeEscapeOperator (
58
+ const LikeEscapeOperator (
59
59
this .target,
60
60
this .regex,
61
61
this .escape, {
62
62
this .operator = 'LIKE' ,
63
63
});
64
+
64
65
final Expression <String > target;
65
66
final Expression <String > regex;
66
67
final Expression <String > escape;
67
68
final String operator ;
68
69
69
70
@override
70
- final Precedence precedence = Precedence .comparisonEq;
71
+ Precedence get precedence => Precedence .comparisonEq;
71
72
72
73
@override
73
74
void writeInto (GenerationContext context) {
Original file line number Diff line number Diff line change @@ -50,10 +50,10 @@ packages:
50
50
dependency: "direct main"
51
51
description:
52
52
name: archive
53
- sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
53
+ sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742"
54
54
url: "https://pub.dev"
55
55
source: hosted
56
- version: "3.6.1 "
56
+ version: "4.0.4 "
57
57
args:
58
58
dependency: transitive
59
59
description:
@@ -948,10 +948,10 @@ packages:
948
948
dependency: "direct main"
949
949
description:
950
950
name: image
951
- sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d
951
+ sha256: "13d3349ace88f12f4a0d175eb5c12dcdd39d35c4c109a8a13dfeb6d0bd9e31c3"
952
952
url: "https://pub.dev"
953
953
source: hosted
954
- version: "4.3.0 "
954
+ version: "4.5.3 "
955
955
image_picker:
956
956
dependency: "direct main"
957
957
description:
@@ -1036,10 +1036,10 @@ packages:
1036
1036
dependency: "direct dev"
1037
1037
description:
1038
1038
name: intl_utils
1039
- sha256: c2b1f5c72c25512cbeef5ab015c008fc50fe7e04813ba5541c25272300484bf4
1039
+ sha256: "35f9a55004871f241e24b07465cf402914992d8549a60205ee0816576a8ddee7"
1040
1040
url: "https://pub.dev"
1041
1041
source: hosted
1042
- version: "2.8.7 "
1042
+ version: "2.8.8 "
1043
1043
io:
1044
1044
dependency: transitive
1045
1045
description:
@@ -1220,10 +1220,10 @@ packages:
1220
1220
dependency: "direct main"
1221
1221
description:
1222
1222
name: lottie
1223
- sha256: "377d87b8dcef640c04717e93afb86a510f0e1117a399ab94dc4b3f39c85eaa87"
1223
+ sha256: c5fa04a80a620066c15cf19cc44773e19e9b38e989ff23ea32e5903ef1015950
1224
1224
url: "https://pub.dev"
1225
1225
source: hosted
1226
- version: "3.3.0 "
1226
+ version: "3.3.1 "
1227
1227
macros:
1228
1228
dependency: transitive
1229
1229
description:
@@ -1601,6 +1601,14 @@ packages:
1601
1601
url: "https://pub.dev"
1602
1602
source: hosted
1603
1603
version: "1.5.1"
1604
+ posix:
1605
+ dependency: transitive
1606
+ description:
1607
+ name: posix
1608
+ sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
1609
+ url: "https://pub.dev"
1610
+ source: hosted
1611
+ version: "6.0.1"
1604
1612
pretty_qr_code:
1605
1613
dependency: "direct main"
1606
1614
description:
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ environment:
20
20
dependencies :
21
21
android_id : ^0.4.0
22
22
ansicolor : ^2.0.3
23
- archive : ^3.4.10
23
+ archive : ^4.0.4
24
24
async : ^2.8.1
25
25
audio_session : ^0.1.25
26
26
auto_size_text : ^3.0.0
You can’t perform that action at this time.
0 commit comments