NiceSortable<T> constructor

const NiceSortable<T>({
  1. Key? key,
  2. required List<NiceSortableItem<T>> items,
  3. required Widget itemBuilder(
    1. NiceSortableItem<T> item,
    2. int index,
    3. bool isDragging
    ),
  4. required void onReorder(
    1. int oldIndex,
    2. int newIndex
    ),
  5. NiceSortableDirection direction = NiceSortableDirection.vertical,
  6. EdgeInsets padding = EdgeInsets.zero,
  7. double separatorHeight = 0,
  8. bool dragHandle = true,
  9. void onDragStart(
    1. int index
    )?,
  10. void onDragEnd(
    1. int oldIndex,
    2. int newIndex
    )?,
  11. bool shrinkWrap = false,
  12. ScrollPhysics? physics,
})

Implementation

const NiceSortable({
  super.key,
  required this.items,
  required this.itemBuilder,
  required this.onReorder,
  this.direction = NiceSortableDirection.vertical,
  this.padding = EdgeInsets.zero,
  this.separatorHeight = 0,
  this.dragHandle = true,
  this.onDragStart,
  this.onDragEnd,
  this.shrinkWrap = false,
  this.physics,
});