Skip to content

Commit 590cabb

Browse files
paschalispPaschalis Pagonidis
andauthored
* [desktop_drop] Removed unneeded asserts (MixinNetwork#245)
* Updated cross_file to package's latest version Co-authored-by: Paschalis Pagonidis <p.pagonidis@enfinity.ae>
1 parent 57b6173 commit 590cabb

File tree

3 files changed

+23
-30
lines changed

3 files changed

+23
-30
lines changed

packages/desktop_drop/example/pubspec.lock

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
8+
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.10.0"
11+
version: "2.11.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
@@ -21,10 +21,10 @@ packages:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
24+
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.2.1"
27+
version: "1.3.0"
2828
clock:
2929
dependency: transitive
3030
description:
@@ -37,18 +37,18 @@ packages:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
40+
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.17.0"
43+
version: "1.17.1"
4444
cross_file:
4545
dependency: "direct main"
4646
description:
4747
name: cross_file
48-
sha256: "552ffd2f851d4314958e6265452af1891959e00cd32b6d17452c5b836e27a0fa"
48+
sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9"
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "0.3.2"
51+
version: "0.3.3+4"
5252
cupertino_icons:
5353
dependency: "direct main"
5454
description:
@@ -63,7 +63,7 @@ packages:
6363
path: ".."
6464
relative: true
6565
source: path
66-
version: "0.4.0"
66+
version: "0.4.1"
6767
fake_async:
6868
dependency: transitive
6969
description:
@@ -99,10 +99,10 @@ packages:
9999
dependency: transitive
100100
description:
101101
name: js
102-
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
102+
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
103103
url: "https://pub.dev"
104104
source: hosted
105-
version: "0.6.5"
105+
version: "0.6.7"
106106
lints:
107107
dependency: transitive
108108
description:
@@ -115,10 +115,10 @@ packages:
115115
dependency: transitive
116116
description:
117117
name: matcher
118-
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
118+
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
119119
url: "https://pub.dev"
120120
source: hosted
121-
version: "0.12.13"
121+
version: "0.12.15"
122122
material_color_utilities:
123123
dependency: transitive
124124
description:
@@ -131,18 +131,18 @@ packages:
131131
dependency: transitive
132132
description:
133133
name: meta
134-
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
134+
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
135135
url: "https://pub.dev"
136136
source: hosted
137-
version: "1.8.0"
137+
version: "1.9.1"
138138
path:
139139
dependency: transitive
140140
description:
141141
name: path
142-
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
142+
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
143143
url: "https://pub.dev"
144144
source: hosted
145-
version: "1.8.2"
145+
version: "1.8.3"
146146
sky_engine:
147147
dependency: transitive
148148
description: flutter
@@ -192,10 +192,10 @@ packages:
192192
dependency: transitive
193193
description:
194194
name: test_api
195-
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
195+
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
196196
url: "https://pub.dev"
197197
source: hosted
198-
version: "0.4.16"
198+
version: "0.5.1"
199199
vector_math:
200200
dependency: transitive
201201
description:
@@ -205,5 +205,5 @@ packages:
205205
source: hosted
206206
version: "2.1.4"
207207
sdks:
208-
dart: ">=2.18.0 <3.0.0"
209-
flutter: ">=1.22.0"
208+
dart: ">=3.0.0-0 <4.0.0"
209+
flutter: ">=1.20.0"

packages/desktop_drop/lib/src/channel.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class DesktopDrop {
4040
Future<void> _handleMethodChannel(MethodCall call) async {
4141
switch (call.method) {
4242
case "entered":
43-
assert(_offset == null);
4443
final position = (call.arguments as List).cast<double>();
4544
_offset = Offset(position[0], position[1]);
4645
_notifyEvent(DropEnterEvent(location: _offset!));
@@ -52,18 +51,15 @@ class DesktopDrop {
5251
_notifyEvent(DropEnterEvent(location: _offset!));
5352
return;
5453
}
55-
assert(_offset != null);
5654
final position = (call.arguments as List).cast<double>();
5755
_offset = Offset(position[0], position[1]);
5856
_notifyEvent(DropUpdateEvent(location: _offset!));
5957
break;
6058
case "exited":
61-
assert(_offset != null);
6259
_notifyEvent(DropExitEvent(location: _offset ?? Offset.zero));
6360
_offset = null;
6461
break;
6562
case "performOperation":
66-
assert(_offset != null);
6763
final paths = (call.arguments as List).cast<String>();
6864
_notifyEvent(
6965
DropDoneEvent(
@@ -75,10 +71,8 @@ class DesktopDrop {
7571
break;
7672
case "performOperation_linux":
7773
// gtk notify 'exit' before 'performOperation'.
78-
assert(_offset == null);
7974
final text = (call.arguments as List<dynamic>)[0] as String;
80-
final offset = ((call.arguments as List<dynamic>)[1] as List<dynamic>)
81-
.cast<double>();
75+
final offset = ((call.arguments as List<dynamic>)[1] as List<dynamic>).cast<double>();
8276
final paths = const LineSplitter().convert(text).map((e) {
8377
try {
8478
return Uri.tryParse(e)?.toFilePath() ?? '';
@@ -93,7 +87,6 @@ class DesktopDrop {
9387
));
9488
break;
9589
case "performOperation_web":
96-
assert(_offset != null);
9790
final results = (call.arguments as List)
9891
.cast<Map>()
9992
.map((e) => WebDropItem.fromJson(e.cast<String, dynamic>()))

packages/desktop_drop/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
sdk: flutter
1313
flutter_web_plugins:
1414
sdk: flutter
15-
cross_file: ^0.3.0
15+
cross_file: ^0.3.3+4
1616

1717
dev_dependencies:
1818
flutter_test:

0 commit comments

Comments
 (0)