dropDestination(for:action:isTargeted:)
Defines the destination of a drag and drop operation that handles the dropped content with a closure that you specify.
Declaration
nonisolated func dropDestination<T>(for payloadType: T.Type = T.self, action: @escaping ([T], CGPoint) -> Bool, isTargeted: @escaping (Bool) -> Void = { _ in }) -> some View where T : Transferable
See Also
Input and events modifiers
onChange(of:perform:)onTapGesture(count:coordinateSpace:perform:)onLongPressGesture(minimumDuration:maximumDistance:pressing:perform:)onLongPressGesture(minimumDuration:pressing:perform:)onPasteCommand(of:perform:)onPasteCommand(of:validator:perform:)onDrop(of:delegate:)onDrop(of:isTargeted:perform:)focusable(_:onFocusChange:)onContinuousHover(coordinateSpace:perform:)