dropfiles_window 0.0.2
dropfiles_window: ^0.0.2 copied to clipboard

A flutter plugin project to support Drag&Drop a file

dropfiles_window #

this plugin modify windows style to accep Drag&Drop a file and wheh Drop a file from this other window. this plugin does call a dart callback function. flutter gets the file name from ths callback function.

Alt Text

Supported Platforms #

  • [ ] macOS
  • [x] Windows
  • [ ] Linux

Usage #

import 'package:dropfiles_window/dropfiles_window.dart';
.
.
.
if (Platform.isWindows == true) {
      // Platform messages may fail, so we use a try/catch PlatformException.
      try {
        DropfilesWindow.modifyWindowAcceptFiles((String strName) {
          // print("fileName=$strName");
          setState(() {
            _dropFileName = strName;
          });
        });
      } on PlatformException {
        _dropFileName = 'Failed to modifyDropFilesWindow.';
      }
    }

refer /example/lib/main.dart for all source code

8
likes
80
pub points
55%
popularity

A flutter plugin project to support Drag&Drop a file

Repository (GitHub)
View/report issues

Documentation

API reference

License

LICENSE

Dependencies

flutter

More

Packages that depend on dropfiles_window