fix!: Remove pointerId from Draggable callbacks (#1313)

Since pointerId is already handled by the handle* methods we don't have to expose it in the onDrag* methods, this conforms with the standard set in Tappable.
This commit is contained in:
Lukas Klingsbo
2022-01-18 23:22:10 +01:00
committed by GitHub
parent b1d4e5872e
commit 27adda17b7
6 changed files with 49 additions and 27 deletions

View File

@ -180,13 +180,13 @@ abstract class MyCollidable extends PositionComponent
}
@override
bool onDragUpdate(int pointerId, _) {
bool onDragUpdate(_) {
_isDragged = true;
return true;
}
@override
bool onDragEnd(int pointerId, DragEndInfo info) {
bool onDragEnd(DragEndInfo info) {
velocity.setFrom(info.velocity / 10);
_isDragged = false;
return true;