Skip to content

Commit 9476147

Browse files
authored
Merge branch 'main' into file_selector_java_17
2 parents 4bee17a + 287739d commit 9476147

7 files changed

Lines changed: 105 additions & 16 deletions

File tree

.ci/flutter_stable.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
1+
ac4e799d237041cf905519190471f657b657155a

CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
packages/animations/** @hannah-hyj
88
packages/camera/** @bparrishMines
9-
packages/cross_file/** @stuartmorgan
10-
packages/extension_google_sign_in_as_googleapis_auth/** @stuartmorgan
9+
packages/cross_file/** @stuartmorgan-g
10+
packages/extension_google_sign_in_as_googleapis_auth/** @stuartmorgan-g
1111
packages/file_selector/** @stuartmorgan-g
1212
packages/flutter_lints/** @chunhtai
1313
packages/flutter_template_images/** @stuartmorgan-g

packages/file_selector/file_selector_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* Updates Java compatibility version to 17.
44
* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
55

6+
## 0.5.1+17
7+
8+
* Updates Pigeon to 26.x.
9+
610
## 0.5.1+16
711

812
* Bumps com.android.tools.build:gradle to 8.12.1.

packages/file_selector/file_selector_android/android/src/main/java/dev/flutter/packages/file_selector_android/GeneratedFileSelectorApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v22.6.2), do not edit directly.
4+
// Autogenerated from Pigeon (v26.0.1), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
package dev.flutter.packages.file_selector_android;

packages/file_selector/file_selector_android/lib/src/file_selector_api.g.dart

Lines changed: 95 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v22.6.2), do not edit directly.
4+
// Autogenerated from Pigeon (v26.0.1), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers
77

@@ -18,6 +18,24 @@ PlatformException _createConnectionError(String channelName) {
1818
);
1919
}
2020

21+
bool _deepEquals(Object? a, Object? b) {
22+
if (a is List && b is List) {
23+
return a.length == b.length &&
24+
a.indexed.every(
25+
((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]),
26+
);
27+
}
28+
if (a is Map && b is Map) {
29+
return a.length == b.length &&
30+
a.entries.every(
31+
(MapEntry<Object?, Object?> entry) =>
32+
(b as Map<Object?, Object?>).containsKey(entry.key) &&
33+
_deepEquals(entry.value, b[entry.key]),
34+
);
35+
}
36+
return a == b;
37+
}
38+
2139
enum FileSelectorExceptionCode {
2240
securityException,
2341
ioException,
@@ -35,17 +53,38 @@ class FileSelectorNativeException {
3553

3654
String message;
3755

38-
Object encode() {
56+
List<Object?> _toList() {
3957
return <Object?>[fileSelectorExceptionCode, message];
4058
}
4159

60+
Object encode() {
61+
return _toList();
62+
}
63+
4264
static FileSelectorNativeException decode(Object result) {
4365
result as List<Object?>;
4466
return FileSelectorNativeException(
4567
fileSelectorExceptionCode: result[0]! as FileSelectorExceptionCode,
4668
message: result[1]! as String,
4769
);
4870
}
71+
72+
@override
73+
// ignore: avoid_equals_and_hash_code_on_mutable_classes
74+
bool operator ==(Object other) {
75+
if (other is! FileSelectorNativeException ||
76+
other.runtimeType != runtimeType) {
77+
return false;
78+
}
79+
if (identical(this, other)) {
80+
return true;
81+
}
82+
return _deepEquals(encode(), other.encode());
83+
}
84+
85+
@override
86+
// ignore: avoid_equals_and_hash_code_on_mutable_classes
87+
int get hashCode => Object.hashAll(_toList());
4988
}
5089

5190
class FileResponse {
@@ -70,7 +109,7 @@ class FileResponse {
70109

71110
FileSelectorNativeException? fileSelectorNativeException;
72111

73-
Object encode() {
112+
List<Object?> _toList() {
74113
return <Object?>[
75114
path,
76115
mimeType,
@@ -81,6 +120,10 @@ class FileResponse {
81120
];
82121
}
83122

123+
Object encode() {
124+
return _toList();
125+
}
126+
84127
static FileResponse decode(Object result) {
85128
result as List<Object?>;
86129
return FileResponse(
@@ -92,6 +135,22 @@ class FileResponse {
92135
fileSelectorNativeException: result[5] as FileSelectorNativeException?,
93136
);
94137
}
138+
139+
@override
140+
// ignore: avoid_equals_and_hash_code_on_mutable_classes
141+
bool operator ==(Object other) {
142+
if (other is! FileResponse || other.runtimeType != runtimeType) {
143+
return false;
144+
}
145+
if (identical(this, other)) {
146+
return true;
147+
}
148+
return _deepEquals(encode(), other.encode());
149+
}
150+
151+
@override
152+
// ignore: avoid_equals_and_hash_code_on_mutable_classes
153+
int get hashCode => Object.hashAll(_toList());
95154
}
96155

97156
class FileTypes {
@@ -101,17 +160,37 @@ class FileTypes {
101160

102161
List<String> extensions;
103162

104-
Object encode() {
163+
List<Object?> _toList() {
105164
return <Object?>[mimeTypes, extensions];
106165
}
107166

167+
Object encode() {
168+
return _toList();
169+
}
170+
108171
static FileTypes decode(Object result) {
109172
result as List<Object?>;
110173
return FileTypes(
111174
mimeTypes: (result[0] as List<Object?>?)!.cast<String>(),
112175
extensions: (result[1] as List<Object?>?)!.cast<String>(),
113176
);
114177
}
178+
179+
@override
180+
// ignore: avoid_equals_and_hash_code_on_mutable_classes
181+
bool operator ==(Object other) {
182+
if (other is! FileTypes || other.runtimeType != runtimeType) {
183+
return false;
184+
}
185+
if (identical(this, other)) {
186+
return true;
187+
}
188+
return _deepEquals(encode(), other.encode());
189+
}
190+
191+
@override
192+
// ignore: avoid_equals_and_hash_code_on_mutable_classes
193+
int get hashCode => Object.hashAll(_toList());
115194
}
116195

117196
class _PigeonCodec extends StandardMessageCodec {
@@ -189,9 +268,11 @@ class FileSelectorApi {
189268
pigeonChannelCodec,
190269
binaryMessenger: pigeonVar_binaryMessenger,
191270
);
271+
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
272+
<Object?>[initialDirectory, allowedTypes],
273+
);
192274
final List<Object?>? pigeonVar_replyList =
193-
await pigeonVar_channel.send(<Object?>[initialDirectory, allowedTypes])
194-
as List<Object?>?;
275+
await pigeonVar_sendFuture as List<Object?>?;
195276
if (pigeonVar_replyList == null) {
196277
throw _createConnectionError(pigeonVar_channelName);
197278
} else if (pigeonVar_replyList.length > 1) {
@@ -219,9 +300,11 @@ class FileSelectorApi {
219300
pigeonChannelCodec,
220301
binaryMessenger: pigeonVar_binaryMessenger,
221302
);
303+
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
304+
<Object?>[initialDirectory, allowedTypes],
305+
);
222306
final List<Object?>? pigeonVar_replyList =
223-
await pigeonVar_channel.send(<Object?>[initialDirectory, allowedTypes])
224-
as List<Object?>?;
307+
await pigeonVar_sendFuture as List<Object?>?;
225308
if (pigeonVar_replyList == null) {
226309
throw _createConnectionError(pigeonVar_channelName);
227310
} else if (pigeonVar_replyList.length > 1) {
@@ -252,9 +335,11 @@ class FileSelectorApi {
252335
pigeonChannelCodec,
253336
binaryMessenger: pigeonVar_binaryMessenger,
254337
);
338+
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
339+
<Object?>[initialDirectory],
340+
);
255341
final List<Object?>? pigeonVar_replyList =
256-
await pigeonVar_channel.send(<Object?>[initialDirectory])
257-
as List<Object?>?;
342+
await pigeonVar_sendFuture as List<Object?>?;
258343
if (pigeonVar_replyList == null) {
259344
throw _createConnectionError(pigeonVar_channelName);
260345
} else if (pigeonVar_replyList.length > 1) {

packages/file_selector/file_selector_android/pigeons/file_selector_api.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ enum FileSelectorExceptionCode {
2323
illegalStateException, //unused
2424
}
2525

26-
class FileSelectorNativeException implements Exception {
26+
class FileSelectorNativeException {
2727
late final FileSelectorExceptionCode fileSelectorExceptionCode;
2828
late final String message;
2929
}

packages/file_selector/file_selector_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dev_dependencies:
2828
flutter_test:
2929
sdk: flutter
3030
mockito: ^5.4.4
31-
pigeon: ^22.4.2
31+
pigeon: ^26.0.1
3232

3333
topics:
3434
- files

0 commit comments

Comments
 (0)