flutter_dropzone icon indicating copy to clipboard operation
flutter_dropzone copied to clipboard

v4.0.0 : type 'NativeByteBuffer' is not a subtype of type 'List' in web/packages/flutter_dropzone_web/flutter_dropzone_web.dart.lib.js 236:44 getFileStream

Open tototo23 opened this issue 9 months ago • 7 comments

Hi, I don't know when it started, but it looks like since I updated my project to Flutter 3.22, dropping a file in web doesn't work anymore. I'm using chrome version 124.0.6367.210 flutter_dropzone: ^4.0.0 Flutter 3.22.1

It looks like the JS file type changed : it used to return a Stream<List<int>>, and now it returns a minified:ix<List<int>> Just using this code :

DropzoneView(
   ...
  onDrop: (dynamic htmlFile) async {
          print('Drop: $htmlFile');
          var stream = controller.getFileStream(htmlFile);
          print('File stream type is : ${stream.runtimeType}');
          ...
   },
   ...
)

getFileStream(htmlFile) is supposed to return an object typed : Stream<List>. But i checked in runtime : Displays in the console :

Drop: Instance of 'minified:li'
File stream type is : minified:ix<List<int>>

It worked very well until I updated to Flutter 3.22, but i don't know if it's the reason...

tototo23 avatar May 23 '24 07:05 tototo23