File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import 'package:desktop_drop/desktop_drop.dart';
66import 'package:file_picker/file_picker.dart' ;
77import 'package:fluent_ui/fluent_ui.dart' ;
88import 'package:flutter_svg/svg.dart' ;
9- import 'package:path/path.dart' ;
109
1110class DropArea extends StatefulWidget {
1211 final Widget ? child;
@@ -34,7 +33,10 @@ class _DropAreaState extends State<DropArea> {
3433 void handleDrop (DropDoneDetails details) {
3534 widget.onUpload (
3635 details.files
37- .where ((file) => widget.extensions? .contains (extension (file.path, 1 )) ?? true )
36+ .where ((file) {
37+ String extension = file.path.split ('.' ).last.toLowerCase (); // Extract file extension
38+ return widget.extensions? .contains (extension ) ?? true ;
39+ })
3840 .map ((f) => f.path)
3941 .toList ()
4042 );
You can’t perform that action at this time.
0 commit comments