fileDropTarget

fun Modifier.fileDropTarget(accept: (DroppedFiles) -> Boolean = { true }, onStarted: (DroppedFiles) -> Unit = {}, onEntered: (DroppedFiles) -> Unit = {}, onMoved: (DroppedFiles) -> Unit = {}, onExited: (DroppedFiles) -> Unit = {}, onChanged: (DroppedFiles) -> Unit = {}, onEnded: (DroppedFiles) -> Unit = {}, onDrop: (DroppedFiles) -> Unit): Modifier(source)

Adds a file drop target to this modifier chain.

All callbacks receive the paths currently being dragged or dropped. The target only participates when accept returns true.

Parameters

accept

returns true when this target should handle the dragged files.

onStarted

called when an accepted file drag starts.

onEntered

called when an accepted file drag enters this target.

onMoved

called when an accepted file drag moves over this target.

onExited

called when an accepted file drag exits this target.

onChanged

called when an accepted file drag changes.

onEnded

called when an accepted file drag ends.

onDrop

called when files are dropped on this target.