NiceSortable<T> constructor
const
NiceSortable<T>({ - Key? key,
- required List<NiceSortableItem<T>> items,
- required Widget itemBuilder(
- NiceSortableItem<T> item,
- int index,
- bool isDragging
),
- required void onReorder(
- int oldIndex,
- int newIndex
),
- NiceSortableDirection direction = NiceSortableDirection.vertical,
- EdgeInsets padding = EdgeInsets.zero,
- double separatorHeight = 0,
- bool dragHandle = true,
- void onDragStart(
- int index
)?,
- void onDragEnd(
- int oldIndex,
- int newIndex
)?,
- bool shrinkWrap = false,
- 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,
});