Class DragToReorder

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • dragToReorder

         final static <T extends Any> Modifier dragToReorder(Modifier $self, T item, List<T> itemList, Integer itemHeight, Function2<T, SlideState, Unit> updateSlideState, Function1<Integer, Unit> onStartDrag, Function3<Float, Integer, Integer, Unit> onDrag, Function2<Integer, Integer, Unit> onStopDrag)

        Adds a drag-to-reorder functionality to the given modifier.

        Parameters:
        item - The item to be dragged.
        itemList - The list of items to which the item belongs.
        itemHeight - The height of each item in the list in pixels.
        updateSlideState - A callback function to update the slide state of an item.
        onStartDrag - A callback function to be invoked when the drag operation starts and provides the starting index.
        onDrag - A callback function to be invoked during the dragging operation
        onStopDrag - A callback function to be invoked when the drag operation ends.
        Returns:

        A modifier that adds drag-to-reorder functionality.