Skip to content

Commit edafb6d

Browse files
committed
🔧 Disallow onTap gesture when any other transform operation is active.
1 parent b56ad31 commit edafb6d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/flutter_box_transform/lib/src/transformable_box.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,11 @@ class _TransformableBoxState extends State<TransformableBox> {
512512
}
513513

514514
/// Called when the box is tapped.
515-
void onTap() => widget.onTap?.call();
515+
void onTap() {
516+
if (isGestureActive) return;
517+
518+
widget.onTap?.call();
519+
}
516520

517521
/// Called when the box drag event starts.
518522
void onDragPanStart(DragStartDetails event) {

0 commit comments

Comments
 (0)