Skip to content

Commit 30bf209

Browse files
AndersKlintBirjuVachhani
authored andcommitted
tap through box if onTap is null
1 parent ac0d9c6 commit 30bf209

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/flutter_box_transform/lib/src/transformable_box.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ class TransformableBox extends StatefulWidget {
125125
/// all moving operations.
126126
final bool draggable;
127127

128-
/// Whether the box ignores tap events and allows them to pass through to widgets
129-
/// behind it. Dragging and resizing interactions are still possible.
130-
final bool tapThrough;
131-
132128
/// Whether to allow flipping of the box while resizing. If this is set to
133129
/// true, the box will flip when the user drags the handles to opposite
134130
/// corners of the rect.
@@ -259,7 +255,6 @@ class TransformableBox extends StatefulWidget {
259255
// Additional controls.
260256
this.resizable = true,
261257
this.draggable = true,
262-
this.tapThrough = false,
263258
this.allowFlippingWhileResizing = true,
264259

265260
// Tap events
@@ -602,7 +597,7 @@ class _TransformableBoxState extends State<TransformableBox> {
602597
content = GestureDetector(
603598
behavior: HitTestBehavior.translucent,
604599
supportedDevices: widget.supportedDragDevices,
605-
onTap: widget.tapThrough ? null : onTap,
600+
onTap: widget.onTap == null ? null : onTap,
606601
onPanStart: onDragPanStart,
607602
onPanUpdate: onDragPanUpdate,
608603
onPanEnd: onDragPanEnd,

0 commit comments

Comments
 (0)