dropfiles_window 0.0.2 icon indicating copy to clipboard operation
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
  • 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

16
likes
90
pub points
44%
popularity

Publisher

unverified uploader

A flutter plugin project to support Drag&Drop a file

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on dropfiles_window