WebFileDrop

Easy to use file drop plugin made for Flutter web.

Tested on

Firefox Google Chrome Safari

Getting Started

Install the web plugin

flutter pub add webfiledrop

Import the plugin in your project

import 'package:webfiledrop/webfiledrop.dart';

Add the drop area widget

Simple implementation

WebFileDropArea(onFileDrop: (file) {
                 // Handle file (Beware file is a type of HTML File not dart:io file)
                })

Get the file as Uint8List

WebFileDropArea(onFileDrop: (file) async {
                  final selectedFile = await WebFileDrop.htmlFileToMemoryFile(file);
                  // Handle Uint8List representation of File
                })