MixinNetwork / MixinNetwork/flutter-plugins

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

Open
#243 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

desktop_drop enhancement
Dominant language
C
Stars
512
Forks
292
Avg merge
15h 8m
Merged PRs (30d)
7

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a Windows Flutter PageView containing two pages, AutomaticKeepAliveClientMixin, and one DropTarget per page. Start by tracing DropTarget handling during the reported navigation and drop sequence; done means only the DropTarget on the visible second page fires its onDrag callbacks.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter
Domain
desktop-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.