Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use with custom drag icon #29

Open
robinjanke opened this issue Jan 17, 2019 · 0 comments
Open

Unable to use with custom drag icon #29

robinjanke opened this issue Jan 17, 2019 · 0 comments

Comments

@robinjanke
Copy link

return new DragAndDropList.withCustomDraggableBehavior(stations, onDragFinish: (before, after) { setState(() { StationModel data = stations[before]; stations.removeAt(before); stations.insert(after, data); this._favoritesService.updateFavoriteList(stations); }); }, itemBuilderCustom: ((BuildContext context, dynamic) { StationModel station = dynamic; DraggableDelegate draggableDelegate = new DraggableDelegate(); return new WidgetAndDelegate( new ListTile( title: new Text(station.name), trailing: MyDraggable( child: Icon(Icons.drag_handle), onDragStarted: draggableDelegate.onDragStartedListener, onDragCompleted: draggableDelegate.onDragCompleted, onMove: draggableDelegate.onMoveListener, feedback: new SizedBox( width: 150, height: 50, child: Text("Just for testing.."), ), childWhenDragging: null, maxSimultaneousDrags: 1, feedbackOffset: Offset(0, 0), data: stations, ), onTap: null, ), draggableDelegate); }), canBeDraggedTo: ((one, two) => true));

I am unable to use this with a custom button to drag the ListItem. Can you please explain what i done wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant