DragAndDropStartTransferScope

Interface

Common
interface DragAndDropStartTransferScope

A scope that allows starting a drag and drop session.

Functions

fun startDragAndDropTransfer(
        transferData: DragAndDropTransferData,
        decorationSize: Size,
        drawDragDecoration: DrawScope.() -> Unit,
    ): Boolean

Initiates a drag-and-drop operation for transferring data.

Parameters

transferDatathe data to be transferred after successful completion of the drag and drop gesture.
decorationSizethe size of the drag decoration to be drawn.
drawDragDecorationprovides the visual representation of the item dragged during the drag and drop gesture.

Returns

true if the method completes successfully, or false if it fails anywhere. Returning false means the system was unable to do a drag because of another ongoing operation or some other reasons.