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 {
@@ -188,9 +267,11 @@ class FileSelectorApi {
188267 pigeonChannelCodec,
189268 binaryMessenger: pigeonVar_binaryMessenger,
190269 );
270+ final Future <Object ?> pigeonVar_sendFuture = pigeonVar_channel.send (
271+ < Object ? > [initialDirectory, allowedTypes],
272+ );
191273 final List <Object ?>? pigeonVar_replyList =
192- await pigeonVar_channel.send (< Object ? > [initialDirectory, allowedTypes])
193- as List <Object ?>? ;
274+ await pigeonVar_sendFuture as List <Object ?>? ;
194275 if (pigeonVar_replyList == null ) {
195276 throw _createConnectionError (pigeonVar_channelName);
196277 } else if (pigeonVar_replyList.length > 1 ) {
@@ -218,9 +299,11 @@ class FileSelectorApi {
218299 pigeonChannelCodec,
219300 binaryMessenger: pigeonVar_binaryMessenger,
220301 );
302+ final Future <Object ?> pigeonVar_sendFuture = pigeonVar_channel.send (
303+ < Object ? > [initialDirectory, allowedTypes],
304+ );
221305 final List <Object ?>? pigeonVar_replyList =
222- await pigeonVar_channel.send (< Object ? > [initialDirectory, allowedTypes])
223- as List <Object ?>? ;
306+ await pigeonVar_sendFuture as List <Object ?>? ;
224307 if (pigeonVar_replyList == null ) {
225308 throw _createConnectionError (pigeonVar_channelName);
226309 } else if (pigeonVar_replyList.length > 1 ) {
@@ -251,9 +334,11 @@ class FileSelectorApi {
251334 pigeonChannelCodec,
252335 binaryMessenger: pigeonVar_binaryMessenger,
253336 );
337+ final Future <Object ?> pigeonVar_sendFuture = pigeonVar_channel.send (
338+ < Object ? > [initialDirectory],
339+ );
254340 final List <Object ?>? pigeonVar_replyList =
255- await pigeonVar_channel.send (< Object ? > [initialDirectory])
256- as List <Object ?>? ;
341+ await pigeonVar_sendFuture as List <Object ?>? ;
257342 if (pigeonVar_replyList == null ) {
258343 throw _createConnectionError (pigeonVar_channelName);
259344 } else if (pigeonVar_replyList.length > 1 ) {
0 commit comments