@@ -586,26 +586,31 @@ class _TargetWidget extends StatelessWidget {
586586 return Positioned (
587587 top: offset.dy,
588588 left: offset.dx,
589- child: IgnorePointer (
590- ignoring: disableDefaultChildGestures,
591- child: FractionalTranslation (
592- translation: const Offset (- 0.5 , - 0.5 ),
593- child: GestureDetector (
594- onTap: onTap,
595- onLongPress: onLongPress,
596- onDoubleTap: onDoubleTap,
597- child: Container (
598- height: size! .height + 16 ,
599- width: size! .width + 16 ,
600- decoration: ShapeDecoration (
601- shape: radius != null
602- ? RoundedRectangleBorder (borderRadius: radius! )
603- : shapeBorder ??
604- const RoundedRectangleBorder (
605- borderRadius: BorderRadius .all (Radius .circular (8 )),
606- ),
607- ),
608- ),
589+ child: disableDefaultChildGestures
590+ ? IgnorePointer (
591+ child: targetWidgetContent (),
592+ )
593+ : targetWidgetContent (),
594+ );
595+ }
596+
597+ Widget targetWidgetContent () {
598+ return FractionalTranslation (
599+ translation: const Offset (- 0.5 , - 0.5 ),
600+ child: GestureDetector (
601+ onTap: onTap,
602+ onLongPress: onLongPress,
603+ onDoubleTap: onDoubleTap,
604+ child: Container (
605+ height: size! .height + 16 ,
606+ width: size! .width + 16 ,
607+ decoration: ShapeDecoration (
608+ shape: radius != null
609+ ? RoundedRectangleBorder (borderRadius: radius! )
610+ : shapeBorder ??
611+ const RoundedRectangleBorder (
612+ borderRadius: BorderRadius .all (Radius .circular (8 )),
613+ ),
609614 ),
610615 ),
611616 ),
0 commit comments