11// Copyright 2013 The Flutter Authors. All rights reserved.
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 (v21.0.0 ), do not edit directly.
4+ // Autogenerated from Pigeon (v22.4.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
@@ -37,7 +37,7 @@ class TypeGroup {
3737
3838 String label;
3939
40- List <String ? > extensions;
40+ List <String > extensions;
4141
4242 Object encode () {
4343 return < Object ? > [
@@ -50,7 +50,7 @@ class TypeGroup {
5050 result as List <Object ?>;
5151 return TypeGroup (
5252 label: result[0 ]! as String ,
53- extensions: (result[1 ] as List <Object ?>? )! .cast <String ? >(),
53+ extensions: (result[1 ] as List <Object ?>? )! .cast <String >(),
5454 );
5555 }
5656}
@@ -59,14 +59,14 @@ class SelectionOptions {
5959 SelectionOptions ({
6060 this .allowMultiple = false ,
6161 this .selectFolders = false ,
62- this .allowedTypes = const < TypeGroup ? > [],
62+ this .allowedTypes = const < TypeGroup > [],
6363 });
6464
6565 bool allowMultiple;
6666
6767 bool selectFolders;
6868
69- List <TypeGroup ? > allowedTypes;
69+ List <TypeGroup > allowedTypes;
7070
7171 Object encode () {
7272 return < Object ? > [
@@ -81,7 +81,7 @@ class SelectionOptions {
8181 return SelectionOptions (
8282 allowMultiple: result[0 ]! as bool ,
8383 selectFolders: result[1 ]! as bool ,
84- allowedTypes: (result[2 ] as List <Object ?>? )! .cast <TypeGroup ? >(),
84+ allowedTypes: (result[2 ] as List <Object ?>? )! .cast <TypeGroup >(),
8585 );
8686 }
8787}
@@ -96,7 +96,7 @@ class FileDialogResult {
9696 /// The selected paths.
9797 ///
9898 /// Empty if the dialog was canceled.
99- List <String ? > paths;
99+ List <String > paths;
100100
101101 /// The type group index (into the list provided in [SelectionOptions] ) of
102102 /// the group that was selected when the dialog was confirmed.
@@ -114,7 +114,7 @@ class FileDialogResult {
114114 static FileDialogResult decode (Object result) {
115115 result as List <Object ?>;
116116 return FileDialogResult (
117- paths: (result[0 ] as List <Object ?>? )! .cast <String ? >(),
117+ paths: (result[0 ] as List <Object ?>? )! .cast <String >(),
118118 typeGroupIndex: result[1 ] as int ? ,
119119 );
120120 }
@@ -124,7 +124,10 @@ class _PigeonCodec extends StandardMessageCodec {
124124 const _PigeonCodec ();
125125 @override
126126 void writeValue (WriteBuffer buffer, Object ? value) {
127- if (value is TypeGroup ) {
127+ if (value is int ) {
128+ buffer.putUint8 (4 );
129+ buffer.putInt64 (value);
130+ } else if (value is TypeGroup ) {
128131 buffer.putUint8 (129 );
129132 writeValue (buffer, value.encode ());
130133 } else if (value is SelectionOptions ) {
@@ -159,43 +162,43 @@ class FileSelectorApi {
159162 /// BinaryMessenger will be used which routes to the host platform.
160163 FileSelectorApi (
161164 {BinaryMessenger ? binaryMessenger, String messageChannelSuffix = '' })
162- : __pigeon_binaryMessenger = binaryMessenger,
163- __pigeon_messageChannelSuffix =
165+ : pigeonVar_binaryMessenger = binaryMessenger,
166+ pigeonVar_messageChannelSuffix =
164167 messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix ' : '' ;
165- final BinaryMessenger ? __pigeon_binaryMessenger ;
168+ final BinaryMessenger ? pigeonVar_binaryMessenger ;
166169
167170 static const MessageCodec <Object ?> pigeonChannelCodec = _PigeonCodec ();
168171
169- final String __pigeon_messageChannelSuffix ;
172+ final String pigeonVar_messageChannelSuffix ;
170173
171174 Future <FileDialogResult > showOpenDialog (SelectionOptions options,
172175 String ? initialDirectory, String ? confirmButtonText) async {
173- final String __pigeon_channelName =
174- 'dev.flutter.pigeon.file_selector_windows.FileSelectorApi.showOpenDialog$__pigeon_messageChannelSuffix ' ;
175- final BasicMessageChannel <Object ?> __pigeon_channel =
176+ final String pigeonVar_channelName =
177+ 'dev.flutter.pigeon.file_selector_windows.FileSelectorApi.showOpenDialog$pigeonVar_messageChannelSuffix ' ;
178+ final BasicMessageChannel <Object ?> pigeonVar_channel =
176179 BasicMessageChannel <Object ?>(
177- __pigeon_channelName ,
180+ pigeonVar_channelName ,
178181 pigeonChannelCodec,
179- binaryMessenger: __pigeon_binaryMessenger ,
182+ binaryMessenger: pigeonVar_binaryMessenger ,
180183 );
181- final List <Object ?>? __pigeon_replyList = await __pigeon_channel
184+ final List <Object ?>? pigeonVar_replyList = await pigeonVar_channel
182185 .send (< Object ? > [options, initialDirectory, confirmButtonText])
183186 as List <Object ?>? ;
184- if (__pigeon_replyList == null ) {
185- throw _createConnectionError (__pigeon_channelName );
186- } else if (__pigeon_replyList .length > 1 ) {
187+ if (pigeonVar_replyList == null ) {
188+ throw _createConnectionError (pigeonVar_channelName );
189+ } else if (pigeonVar_replyList .length > 1 ) {
187190 throw PlatformException (
188- code: __pigeon_replyList [0 ]! as String ,
189- message: __pigeon_replyList [1 ] as String ? ,
190- details: __pigeon_replyList [2 ],
191+ code: pigeonVar_replyList [0 ]! as String ,
192+ message: pigeonVar_replyList [1 ] as String ? ,
193+ details: pigeonVar_replyList [2 ],
191194 );
192- } else if (__pigeon_replyList [0 ] == null ) {
195+ } else if (pigeonVar_replyList [0 ] == null ) {
193196 throw PlatformException (
194197 code: 'null-error' ,
195198 message: 'Host platform returned null value for non-null return value.' ,
196199 );
197200 } else {
198- return (__pigeon_replyList [0 ] as FileDialogResult ? )! ;
201+ return (pigeonVar_replyList [0 ] as FileDialogResult ? )! ;
199202 }
200203 }
201204
@@ -204,36 +207,36 @@ class FileSelectorApi {
204207 String ? initialDirectory,
205208 String ? suggestedName,
206209 String ? confirmButtonText) async {
207- final String __pigeon_channelName =
208- 'dev.flutter.pigeon.file_selector_windows.FileSelectorApi.showSaveDialog$__pigeon_messageChannelSuffix ' ;
209- final BasicMessageChannel <Object ?> __pigeon_channel =
210+ final String pigeonVar_channelName =
211+ 'dev.flutter.pigeon.file_selector_windows.FileSelectorApi.showSaveDialog$pigeonVar_messageChannelSuffix ' ;
212+ final BasicMessageChannel <Object ?> pigeonVar_channel =
210213 BasicMessageChannel <Object ?>(
211- __pigeon_channelName ,
214+ pigeonVar_channelName ,
212215 pigeonChannelCodec,
213- binaryMessenger: __pigeon_binaryMessenger ,
216+ binaryMessenger: pigeonVar_binaryMessenger ,
214217 );
215- final List <Object ?>? __pigeon_replyList = await __pigeon_channel
218+ final List <Object ?>? pigeonVar_replyList = await pigeonVar_channel
216219 .send (< Object ? > [
217220 options,
218221 initialDirectory,
219222 suggestedName,
220223 confirmButtonText
221224 ]) as List <Object ?>? ;
222- if (__pigeon_replyList == null ) {
223- throw _createConnectionError (__pigeon_channelName );
224- } else if (__pigeon_replyList .length > 1 ) {
225+ if (pigeonVar_replyList == null ) {
226+ throw _createConnectionError (pigeonVar_channelName );
227+ } else if (pigeonVar_replyList .length > 1 ) {
225228 throw PlatformException (
226- code: __pigeon_replyList [0 ]! as String ,
227- message: __pigeon_replyList [1 ] as String ? ,
228- details: __pigeon_replyList [2 ],
229+ code: pigeonVar_replyList [0 ]! as String ,
230+ message: pigeonVar_replyList [1 ] as String ? ,
231+ details: pigeonVar_replyList [2 ],
229232 );
230- } else if (__pigeon_replyList [0 ] == null ) {
233+ } else if (pigeonVar_replyList [0 ] == null ) {
231234 throw PlatformException (
232235 code: 'null-error' ,
233236 message: 'Host platform returned null value for non-null return value.' ,
234237 );
235238 } else {
236- return (__pigeon_replyList [0 ] as FileDialogResult ? )! ;
239+ return (pigeonVar_replyList [0 ] as FileDialogResult ? )! ;
237240 }
238241 }
239242}
0 commit comments