drop_zone
1.0.2, released 6 years ago by an unverified publisher
A simple way to bring drag-and-drop file choosing to Flutter Web.
What it does
Allows users to drag and drop files onto a designated widget in Flutter Web. Provides callbacks for drag enter, drag exit, and file drop events, exposing the dropped html files for use.
AI-written summary of version 1.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter Web application that requires file uploads via drag and drop.
- You want a simple widget wrapper to handle browser drag-and-drop events.
Skip it when
- You need a cross-platform file picker that also targets mobile or desktop natively with the same API (this is for Flutter Web using html.File).
- You are not targeting Flutter Web.
Strengths
- Simple widget-based API.
- Supports multiple drop zones.
- Provides useful callbacks for drag enter, exit, and drop events.
Weaknesses
- Web-only package tied to dart:html types.
- Limited documentation beyond basic usage.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
not documented
DropZone(
onDragEnter: () {
print('drag enter');
},
onDragExit: () {
print('drag exit');
},
onDrop: (List<html.File> files) {
print('files dropped');
print(files);
},
child: Container(
width: 300,
height: 300,
)
)Alternatives
Packages that do the same job and could replace drop_zone.
- flutter_dropzone
A drag-and-drop file plugin for Flutter Web applications.
50Compare - file_selector_macos
macOS implementation of the file_selector plugin
82Compare - flutter_downloader
Plugin to create and manage background download tasks on Android and iOS.
80Compare - path_provider_android
Android implementation of the path_provider plugin for finding commonly used locations.
79Compare