Skip to content
pubscout

flutter_dropzone

4.2.1, released 2 years ago by tramontana.co.hu

A drag-and-drop file plugin for Flutter Web applications.

WASM-ready
$ flutter pub add flutter_dropzone
Source repository

What it does

It exposes a DropzoneView platform view to handle dragging and dropping files into a Flutter Web app. It provides a controller with methods to retrieve file metadata, byte data, streams, or temporary URLs, and also supports picking files via a browser dialog.

AI-written summary of version 4.2.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter Web application that needs to accept dragged and dropped files.
  • You need to extract file metadata like name, size, MIME type, or read file contents on the web.

Skip it when

  • You are targeting non-web platforms where drag-and-drop file handling is required, as it only functions on the web.
  • You only need drag-and-drop *inside* a Flutter app rather than dropping files *into* it from the OS.

Strengths

  • Seamless integration as a federated plugin that compiles cleanly on cross-platform apps without web-only errors.
  • Provides a rich controller API to read file data, streams, and manage temporary file URLs.

Weaknesses

  • Web only; it will not function on mobile platforms (returns error text on non-web platforms).
  • Underlying file references are HTML File API references with inherent browser limitations.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3

Use kIsWeb check when embedding DropzoneView to ensure cross-platform compilation.

Stack(
  children: [
    DropzoneView(
      operation: DragOperation.copy,
      cursor: CursorType.grab,
      onCreated: (DropzoneViewController ctrl) => controller = ctrl,
      onDropFile: (DropzoneFileInterface file) => print('Drop: ${file.webFile}'),
    ),
    Center(child: Text('Drop files here')),
  ],
)

Alternatives

Packages that do the same job and could replace flutter_dropzone.

Works with

Packages commonly used together with flutter_dropzone: ones it builds on, ones built on it, and its own family.