1

i have a dragtarget and multiple draggables. I was able to successfully drop the draggable to the dragtarget. But when a new draggable hovers over the placed dragtarget it removes the already placed on the dragtarget?.I've tried using ignorepointer. im not getting the desired output.

enter image description here

                            onWillAccept: (data) {
                              return data ==
                                  controller.options[controller
                                      .selectedAnserIndex]; // assigning data
                            },
                            onAccept: (data) {
                              controller.updateDropped(
                                  controller.isDropped); // updating a bool to fix the drag target
                              controller.updateIndexOfBlank(index);
                            },
                            onLeave: (data) {
                              controller.updateDropped(false); // on leave making it make it false
                            },
Febin Johnson
  • 277
  • 1
  • 6
  • 21
  • I don’t know what functionality you want to achieve, but you could check wether the DragTarget is already occupied inside it’s onWillAccept method and if it is you just return false. This should prevent it from changing on hover. – Andrej Jul 12 '23 at 09:05

0 Answers0