mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 04:18:25 +08:00
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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user