Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[desktop_drop]: support multiple DropTarget and improve web handling #235

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

LorTos
Copy link

@LorTos LorTos commented Apr 6, 2023

These are some changes I made to support multiple independent DropTargets for an app I'm currently working on, unfortunately I don't have a lot of time to clean it up at the moment, but wanted to share it in case you were interested and had time to polish it and use it.

NOTE: Since I needed it just for web I focused on only that implementation, I haven't checked what happens on the other platforms.

It uses Flutter's RenderProxyBoxWithHitTestBehavior and hitTest to determine which one of the multiple targets are being hit, it then sends an exit event to the previous target (if any) and sends the current event to the target.

Hope it's clear enough and it helps!

@LorTos LorTos force-pushed the feat/multiple_drop_targets branch from fcaf238 to 28f0f25 Compare November 15, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant