flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

Multiple DropTargets in a PageView get their onDrag callbacks triggered instead of just one

Open Sockitos opened this issue 2 years ago • 2 comments

When you have multiple DropTargets across different pages of a PageView with AutomaticKeepAliveClientMixin and you drop a file onto one of them, all the targets that are "alive" (due to the KeepAlive) fire the onDrag callbacks.

Reproduce Steps

Steps to reproduce the behavior:

  1. Create a PageView with two pages
  2. Make sure those pages use AutomaticKeepAliveClientMixin
  3. Place a DropTarget in each page
  4. Navigate to the second page
  5. Drop a file onto the DropTarget
  6. Both DropTargets fire the onDrag callbacks

Expected behavior

Only the DropTarget on the second page should fire the onDrag callbacks.

Version:

  • Flutter Version: 3.7.12
  • OS: Windows
  • plugin: 0.4.1

Sockitos avatar May 09 '23 16:05 Sockitos

Same problem here

bellaminemo81172 avatar Sep 07 '23 11:09 bellaminemo81172

Same problem too. Do we have any solution for this? @boyan01 @Sockitos @bellaminemo81172 ??

ourdex avatar Nov 28 '23 06:11 ourdex