androidx.compose.foundation.draganddrop
dragAndDropTarget
Function · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
A modifier that allows for receiving from a drag and drop gesture.
Parameters
fun Modifier.dragAndDropTarget(
shouldStartDragAndDrop: (startEvent: DragAndDropEvent) -> Boolean,
target: DragAndDropTarget,
): Modifier
shouldStartDragAndDrop: (startEvent: DragAndDropEvent) -> BooleanRequired
shouldStartDragAndDrop: (startEvent: DragAndDropEvent) -> BooleanRequiredAllows the Composable to decide if it wants to receive from a given drag and drop session by inspecting the DragAndDropEvent that started the session.
target: DragAndDropTargetRequired
target: DragAndDropTargetRequiredThe DragAndDropTarget that will receive events for a given drag and drop session. All drag and drop target modifiers in the hierarchy will be given an opportunity to participate in a given drag and drop session via shouldStartDragAndDrop.
Library docs
A modifier that allows for receiving from a drag and drop gesture.
Learn how to use Modifier.dragAndDropTarget to receive drag and drop events from inside your
app or from other apps: