File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/flutter_box_transform/lib/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,10 @@ 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+
128132 /// Whether to allow flipping of the box while resizing. If this is set to
129133 /// true, the box will flip when the user drags the handles to opposite
130134 /// corners of the rect.
@@ -255,6 +259,7 @@ class TransformableBox extends StatefulWidget {
255259 // Additional controls.
256260 this .resizable = true ,
257261 this .draggable = true ,
262+ this .tapThrough = false ,
258263 this .allowFlippingWhileResizing = true ,
259264
260265 // Tap events
@@ -597,7 +602,7 @@ class _TransformableBoxState extends State<TransformableBox> {
597602 content = GestureDetector (
598603 behavior: HitTestBehavior .translucent,
599604 supportedDevices: widget.supportedDragDevices,
600- onTap: onTap,
605+ onTap: widget.tapThrough ? null : onTap,
601606 onPanStart: onDragPanStart,
602607 onPanUpdate: onDragPanUpdate,
603608 onPanEnd: onDragPanEnd,
You can’t perform that action at this time.
0 commit comments