Questions tagged [dragtarget]

17 questions
3
votes
0 answers

How do I keep my widget state when reordering them via Draggable&DragTarget?

I'm using this reorderables package. This package works by having a list of children widgets that are each wrapped with a Draggable and put inside a DragTarget. Before that the childs key is assigned to a GlobalObjectKey. After the dragTarget is…
2
votes
1 answer

Flutter Draggable - How to Reset Draggable to Starting Position?

Updates: See latest updates at the bottom. Original I have flutter Draggable and DragTarget widgets that are working except that after I place the DragTarget I get to a particular situation where I want to rebuild the DragTarget and move the…
Tommie C.
  • 12,895
  • 5
  • 82
  • 100
1
vote
0 answers

Flutter Draggable and dragtarget, how to prevent hover change data?

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.…
Febin Johnson
  • 277
  • 1
  • 6
  • 21
1
vote
1 answer

how can i remove an item from this listview builder after being draged to the darg target

i am new with dart, i tryed to build a verbes game with drag and drop i created a model then the draggable widget and the drag target then i build a list view with the data that i pushed from the main but the problem is that i didn't find how to…
1
vote
1 answer

How to get global coordinates inside DragTarget.onMove (Flutter)?

I need to get position of draggable inside DragTarget.onMove. But in DragTargetDetails.offset we have some weird values. In source code I see that it is set to avatar._lastOffset which is globalPosition - dragStartPoint. But I don't have access to…
1
vote
1 answer

Flutter: DragTarget shows wrong data when hovering over it with a new Draggable

I'm rather new to development, and started off with web dev, though now work with Flutter for about 2 months now, which means I still learn tons - so please, bear with me. I'm currently working on a drag & drop periodic table. I already got a…
soulcoding
  • 15
  • 5
1
vote
1 answer

Draggable triggering wrong info while hovering over Dragtarget in Flutter

I'm working with draggables and dragtargets in Flutter. I currently have two dragtargets in my project, both respond correctly once I drop a draggable over them. However, once the first drag from draggable1 to dragtarget1 is complete, the second…
0
votes
0 answers

Flutter Multiple Dragtargets with CustomPainter Path Possible?

I want to know if this is even possible in Flutter Gridview and CustomPaint Items Desired Outcome I tried it with a CustomPainter Class and different Custom Path Widgets In Flutter coded import 'package:flutter/material.dart'; class PaintCharT…
0
votes
1 answer

Flutter Draggable how to not insert data on hover?

Im using drag target and draggable to create a drag and drop fill in the blanks. I was able to create drop the draggable to the correct drag target. How ever when i drag(Hover) another draggable over the the occupied drag target it either remove…
Febin Johnson
  • 277
  • 1
  • 6
  • 21
0
votes
1 answer

How do I get data to pun into list? flutter and dart

I make draggable in in my app where I want the data from draggable to pass to dragTarget and that data put in List of userInput but as I can see the list is not growing when I try to print it. what did I do wrong? Widget _generateOpaque(int index)…
grizzzzzy
  • 17
  • 5
0
votes
0 answers

While dragging any widget ,can we drop same widget to multiple drag targets/positions

When we drag at once any widget and want to drop that same draggable widget to multiple places and on double tap it should release the draggable widget . I want this to be done in flutter , i tried this but can achieve drop at one position only and…
0
votes
1 answer

I'm trying to make a selection of words by clicking from which these words are moved into cells

I'm trying to make a selection of words by clicking from which these words are moved into cells. I've done this with Draggable and DragTarget so far it works if you move your finger. But I need to be able to move them by clicking. import…
0
votes
1 answer

multiple draggables are always moving once item is dragged

My goal is to have a dog as my DragTarget and multiple items I can drag to the dog. Whenever I drag one item the others are switching positions. Also when I drag the item onto the DragTarget I want to print out a text in a text-box - but nothing is…
awwd
  • 19
  • 5
0
votes
0 answers

how to get the argument value of a draggable in flutter dart?

I have some draggable pictures and 3 different drag targets. With each picture I have passed a position argument which stores whether the picture should be in first dragtarget or second or third. How can i access that position whenever a picture is…
0
votes
0 answers

How to change the items from carousel_slider with some trigger / action in Flutter?

I'm having trouble replacing a set of images in the carousel_slider with an action / trigger like onAccept() in my code I currently using a draggable the slider, and my goal is I want to change the set of images when I'm dragging the image into the…
1
2