dnd
2.0.1, released 5 years ago by jakobservices.ch
Drag and Drop for Dart web apps with mouse and touch support.
What it does
Provides Draggable and Dropzone classes to enable drag-and-drop interactions in Dart web applications. Supports mouse and touch input, custom drag avatars, and shadow DOM event retargeting.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Dart web application that needs drag-and-drop capabilities.
- You need touch support alongside mouse dragging for mobile web browsers.
Skip it when
- You are building a mobile or desktop Flutter app (this package is for Dart web apps using HTML elements).
- You are looking for standard Flutter widget tree drag-and-drop utilities (like Draggable in Flutter SDK).
Strengths
- Supports both mouse and touch interactions.
- Configurable avatar handlers for visual drag feedback.
- Support for Shadow DOM and Web Components via retargeting.
Weaknesses
- Limited strictly to Dart web applications using HTML elements.
- Not applicable to native Flutter mobile/desktop apps.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Instantiate Draggable and Dropzone classes passing HTML elements or query selectors.
Draggable draggable = Draggable(querySelectorAll('.draggable'), avatarHandler: AvatarHandler.clone());
Dropzone dropzone = Dropzone(querySelector('.dropzone'));Alternatives
Packages that do the same job and could replace dnd.
- kalender
A customizable calendar widget with day, multi-day, month, and schedule views.
92Compare - flutter_reorderable_grid_view
Animated GridViews and Wraps with drag-and-drop reordering and item animations.
91Compare - super_drag_and_drop
Native drag and drop for Flutter across desktop, mobile and web.
78Compare - super_context_menu
Context menu widget supporting native menus on platforms and drag & drop transitions on mobile.
76Compare