DragAndDropModifierNode

Function
Common
Deprecated Use DragAndDropSourceModifierNode instead
@JsName("funDragAndDropModifierNode1")
fun DragAndDropModifierNode(): DragAndDropModifierNode

Creates a Modifier.Node for starting platform drag and drop sessions with the intention of transferring data. A drag and stop session is started by calling DragAndDropModifierNode.drag.

Common
Deprecated Use DragAndDropTargetModifierNode instead
@JsName("funDragAndDropModifierNode2")
fun DragAndDropModifierNode(
    shouldStartDragAndDrop: (event: DragAndDropEvent) -> Boolean,
    target: DragAndDropTarget,
): DragAndDropModifierNode

Creates a Modifier.Node for receiving transfer data from platform drag and drop sessions. All DragAndDropModifierNode instances provided by this function may also start drag and drop sessions by calling DragAndDropModifierNode.drag.

Parameters

shouldStartDragAndDrop allows for inspecting the start DragAndDropEvent for a given session to decide whether or not the provided DragAndDropTarget would like to receive from it.
target allows for receiving events and transfer data from a given drag and drop session.