drag_drop_listview_example

Came across this Use Flutter to drag and drop items within the ListView to other locations and also drag the whole listview around.

Introduction

Drag and drop is typical mobile application interaction. As the user long presses (at times called touch and hold) on a widget, another widget shows up underneath the user’s finger, and the user drags the widget to a last area and deliveries it.

Drag and drop is important interaction in mobile apps. This article is about a simple demo application using flutter Drag and Drop. If you’re trying to use these widgets in real life application, hope this article will help you.

In this demo, you’ll build a drag-and-drop interaction where the user presses on a choice of fruit name, and then drags that name to the picture of the correct fruit.

Getting started

This project is a starting point for a Flutter application.

Features Supported and Code Walkthrough

  1. create a Model of Dragabble lists

  2. Creating Data of Draggable lists

  3. Build drga and drop faltlists

  4. Dragging item in list View

  5. Creating Drag Handles

  6. Drag List to Other List View

  7. Improve Dragabble list design

  8. Change space in Dragabble listview

PRO’S

  1. When dragging an item to the top/ bottom the list scroll accordingly

  2. Works with different sized items

  3. material like behaviour

Technologies used

  1. Material design

  2. Android/ios

  3. Flutter

dependencies:

In your pubspec.yaml Add

flutter_list_drag_and_drop: “^0.1.3”

preview--3--1

Credits to the Author keep up the Good work and this is Awesome for flutter beginners

References

  1. https://docs.flutter.dev/get-started/codelab

  2. https://flutterawesome.com/use-flutter-to-drag-and-drop-items-within-the-listview/

GitHub

View Github