dnd_kit_flutter 0.2.0-dev.0
dnd_kit_flutter: ^0.2.0-dev.0 copied to clipboard
Flutter drag-and-drop toolkit with core widgets, sensors, measuring, overlays, and sortable presets.
Changelog #
0.2.0-dev.0 #
- Starts the shared-runtime development line for
dnd_kit_flutteron top ofdnd_kit_core: ^0.2.0-dev.0. - Breaking:
DndPointerSensormoved todnd_kit_coreand is now driven by aDndRuntimeinstead of aDndController. Construct it withDndPointerSensor(runtime: controller.runtime, ...). The class remains importable frompackage:dnd_kit_flutter/dnd_kit_flutter.dartvia re-export. This lets the Flutter and Jaspr adapters share one pointer-activation state machine. - Added
DndController.runtimeto expose the shared runtime to adapter sensors.
0.1.0 #
- First public release of the Flutter adapter under the
dnd_kit_fluttername (previously published asdnd_kit). Includes scope/controller, draggable, droppable, drag handle, overlay, pointer/long-press/keyboard sensors, measuring, auto-scroll, diagnostics, and stable sortable presets. - Depends on
dnd_kit_core: ^0.1.0. - Breaking: removed
DndLongPressActivation.hapticFeedback. Haptic feedback is now configured throughDndDraggable.enableHapticFeedbackor the nearestDndScope.enableHapticFeedbackdefault, which defaults totrue. - Touch drag activation now emits one
HapticFeedback.selectionClick()pulse by default when the drag starts, including both the platform-adaptive delayed touch path and explicitlongPressActivation. Mouse, trackpad, and keyboard activations emit no haptic feedback. - Fixed active drag geometry so overlays and collision detection stay aligned with the pointer when a scrollable ancestor moves during the drag.
- Draggables now work inside scrollables, including lazy
ListView.builder.DndDraggableactivates through an arena-winningMultiDragGestureRecognizerinstead of a pan recognizer, so a drag can start without losing the gesture to an enclosingScrollable. - Behavior change: default activation is now platform-adaptive — precise
pointers (mouse) drag immediately, while touch uses a short hold (delayed) so a
quick touch can still scroll. Set
activationConstraint: DndSensorActivationConstraint(distance: …)for immediate touch drag. - Sortable strategies (
verticalList,horizontalList,grid) now compute reorder intent from the measured (visible) item subset, so reordering stays correct in lazy lists where off-screen items are not measured. - An active drag and its registration/measured rect now survive the source element being recycled by a lazy list mid-drag.
- Fixed a
Duplicate draggable/droppable idcrash that could occur while auto-scrolling a lazy list during a drag, when the list re-mounts a keyed item before disposing the old one.findChildIndexCallbackis now a performance recommendation rather than a requirement. - Duplicate
DndDraggable/DndDroppableids that remain mounted after widget reconciliation now surface an actionableDndDiagnosticsConfig.onWarningcallback instead of staying silently last-wins. - The Kanban and multi-container examples now use
ListView.builder(withfindChildIndexCallback) to demonstrate lazy sortable columns. The Kanban board is lazy in both axes — the horizontal column row and each column's vertical task list. Their task cards use the default platform-adaptive activation (immediate with a mouse, hold-to-drag on touch) so a quick swipe scrolls the list instead of starting a drag.
0.1.0-dev.1 #
- Added a package-local
example/example.mdso pub.dev can render a compact illustrative example for the package. - Clarified package README links to the quick example and full runnable repository examples.
- Updated the
dnd_kit_coredependency to^0.1.0-dev.1.
0.1.0-dev.0 #
- Initial development release of the main
dnd_kitFlutter package. - Includes core drag/drop widgets, scope/controller APIs, pointer, long-press, and keyboard activation, measuring, collision runtime, modifiers, drag overlays, visual state builders, auto-scroll, diagnostics, and stable sortable list/grid presets.
- Exposes the pure Dart
dnd_kit_coreAPI through the main package for application convenience. - Keeps experimental multi-container sortable helpers out of the stable same-container sortable contract.