_TypeError instead of FileSelectionCanceledError is thrown in case of Cancel
If I cancel a file picker, the following error occurs:
Unhandled Exception: type 'RangeError' is not a subtype of type 'String'
#0 new FileSelectionCanceledError (package:file_picker_cross/file_picker_cross.dart:275:5)
#1 FilePickerCross.importFromStorage (package:file_picker_cross/file_picker_cross.dart:64:13)
<asynchronous suspension>
The expected error is FileSelectionCanceledError
.
This is due to the FileSelectionCanceledError.msg
parameter defined as String. However, RangeError (raised here) is passed to the constructor.
I'm running it on MacOS with Flutter v2.10.5.
Edited by Rustam Gilyaev