DragAndDropStartTransferScope


A scope that allows starting a drag and drop session.

Summary

Public functions

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

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

Cmn

Public functions

startDragAndDropTransfer

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

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

Parameters
transferData: DragAndDropTransferData

the data to be transferred after successful completion of the drag and drop gesture.

decorationSize: Size

the size of the drag decoration to be drawn.

drawDragDecoration: DrawScope.() -> Unit

provides the visual representation of the item dragged during the drag and drop gesture.

Returns
Boolean

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.