-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add DragTarget callback onAcceptDetails, plus helper class DragTarget… #55257
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
Conversation
|
Exactly what I was looking for yesterday. Hope this is merged soon |
547037d to
9d8e696
Compare
d7bf68d to
9a485ab
Compare
9a485ab to
56c6374
Compare
|
Ping @goderbauer |
|
@monkeyswarm My last comment about the location of the data still seems unresolved. Any thoughts on that? |
56c6374 to
37bf7fc
Compare
|
Apologies, I hadn't pushed changes which moved the data into the DragTargetDetails. PTAL. |
|
Looks like the analyzer is unhappy. |
|
I noticed that, however, its complaints seem wrong. It's a bunch of 'always_specify_types' lint errors, but all of the lines already have fully specified types. It feels as if the analyzer is looking at a very old commit (as I had fixed this several commit-pushes ago). Is there a known issue with force-pushing commits? (I.e. should I be pushing new commits instead of force-pushing the same commit?) |
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
| widget.onAcceptWithDetails(DragTargetDetails(data:avatar.data as T, offset:avatar._lastOffset)); | |
| widget.onAcceptWithDetails(DragTargetDetails(data: avatar.data as T, offset: avatar._lastOffset)); |
|
Odd. Maybe push a new commit with the nit fixed to retrigger it? |
|
FWIW, I am seeing the same analyzer failures when I run |
|
I also see them when I run locally. But, for example, the second failure Is this a bug with the analyzer? |
DragTargetDetails is defined as |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
171aab1 to
48878b2
Compare
|
, ah yes, forgot about the generics part of the specification, thanks. |
…Details, to report offset on drop
…ss DragTargetDetails, to report offset on drop
…Details, to report offset on drop
48878b2 to
87b556f
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM when cirrus is happy.
…Details, to report offset on drop
Description
Adds the ability for DragTarget to get the drop offset. Adds a new onAcceptDetails callback, and helper class DragTargetDetails.
Related Issues
Tests
draggable_test.dart has been updated
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read [Handling breaking changes].