Home > Software design >  Flutter : click-and-drag items in a list
Flutter : click-and-drag items in a list

Time:09-21

i'm searching a widget to display a list of items and, with an animation, i would like to move the order of the items in the list with click-and-drag.

enter image description here

CodePudding user response:

Its already provide by flutter. You can create withour any addtional package with ReorderableListView .

documentation:

A list whose items the user can interactively reorder by dragging.

 ReorderableListView(
    buildDefaultDragHandles: false,
    onReorder:(int oldIndex, int newIndex){}
     children: []

CodePudding user response:

You can use the ReorderableListView Widget to this. Here is a tutorial from Flutter Devs!

  • Related