drag_and_drop_lists library

Drag and drop list reordering for two level lists.

DragAndDropLists is the main widget, and contains numerous options for controlling overall list presentation.

The children of DragAndDropLists are DragAndDropList or another class that inherits from DragAndDropListInterface such as DragAndDropListExpansion. These lists can be reordered at will. Each list contains its own properties, and can be styled separately if the defaults provided to DragAndDropLists should be overridden.

The children of a DragAndDropListInterface are DragAndDropItem. These are the individual elements and can be reordered within their own list and into other lists. If they should not be able to be reordered, they can also be locked individually.

Typedefs

ItemOnAccept = void Function(DragAndDropItem incoming, DragAndDropItem target)
ItemOnWillAccept = bool Function(DragAndDropItem? incoming, DragAndDropItem target)
ItemTargetOnAccept = void Function(DragAndDropItem incoming, DragAndDropListInterface parentList, DragAndDropItemTarget target)
ItemTargetOnWillAccept = bool Function(DragAndDropItem? incoming, DragAndDropItemTarget target)
ListOnAccept = void Function(DragAndDropListInterface incoming, DragAndDropListInterface target)
ListOnWillAccept = bool Function(DragAndDropListInterface? incoming, DragAndDropListInterface? target)
ListTargetOnAccept = void Function(DragAndDropListInterface incoming, DragAndDropListTarget target)
ListTargetOnWillAccept = bool Function(DragAndDropListInterface? incoming, DragAndDropListTarget target)
OnDropOnLastTarget = void Function(DragAndDropListInterface newOrReordered, DragAndDropListTarget receiver)
OnExpansionChanged = void Function(bool expanded)
OnItemAdd = void Function(DragAndDropItem newItem, int listIndex, int newItemIndex)
OnItemDraggingChanged = void Function(DragAndDropItem item, bool dragging)
OnItemDropOnLastTarget = void Function(DragAndDropItem newOrReorderedItem, DragAndDropListInterface parentList, DragAndDropItemTarget receiver)
OnItemReorder = void Function(int oldItemIndex, int oldListIndex, int newItemIndex, int newListIndex)
OnItemReordered = void Function(DragAndDropItem reorderedItem, DragAndDropItem receiverItem)
OnListAdd = void Function(DragAndDropListInterface newList, int newListIndex)
OnListDraggingChanged = void Function(DragAndDropListInterface? list, bool dragging)
OnListReorder = void Function(int oldListIndex, int newListIndex)
OnListReordered = void Function(DragAndDropListInterface reorderedList, DragAndDropListInterface receiverList)
OnPointerDown = void Function(PointerDownEvent event)
OnPointerMove = void Function(PointerMoveEvent event)
OnPointerUp = void Function(PointerUpEvent event)