From 617571a3e1a0b7ffcd0189087539722b0348b56e Mon Sep 17 00:00:00 2001 From: Cas van Luijtelaar Date: Mon, 20 Nov 2023 11:22:49 +0100 Subject: [PATCH] disable multi drag support --- lib/src/reorderable_grid.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/reorderable_grid.dart b/lib/src/reorderable_grid.dart index db5d491..71f7704 100644 --- a/lib/src/reorderable_grid.dart +++ b/lib/src/reorderable_grid.dart @@ -515,6 +515,10 @@ class SliverReorderableGridState extends State Drag? _dragStart(Offset position) { assert(_dragInfo == null); + // if any items are already being dragged, ignore this dragstart + if(_items.values.any((e) => e.dragging)) return null; + + final _ReorderableItemState item = _items[_dragIndex!]!; item.dragging = true; item.rebuild();