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+
2139enum 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
5190class 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
97156class 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
117196class _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 ) {
0 commit comments