Skip to content

Commit

Permalink
Update showcase.dart
Browse files Browse the repository at this point in the history
added prop allowTargetInteraction which will allow target's default behaviour
  • Loading branch information
pawanbangar authored Aug 7, 2024
1 parent a635729 commit 4676618
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/src/showcase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ class Showcase extends StatefulWidget {
/// Defaults to 7.
final double toolTipSlideEndDistance;

final bool allowTargetInteraction;

const Showcase({
required this.key,
required this.description,
Expand Down Expand Up @@ -298,6 +300,7 @@ class Showcase extends StatefulWidget {
this.onBarrierClick,
this.disableBarrierInteraction = false,
this.toolTipSlideEndDistance = 7,
this.allowTargetInteraction = false
}) : height = null,
width = null,
container = null,
Expand Down Expand Up @@ -339,6 +342,7 @@ class Showcase extends StatefulWidget {
this.onBarrierClick,
this.disableBarrierInteraction = false,
this.toolTipSlideEndDistance = 7,
this.allowTargetInteraction = false
}) : showArrow = false,
onToolTipClick = null,
scaleAnimationDuration = const Duration(milliseconds: 300),
Expand Down Expand Up @@ -587,6 +591,7 @@ class _ShowcaseState extends State<Showcase> {
),
if (_isScrollRunning) Center(child: widget.scrollLoadingWidget),
if (!_isScrollRunning) ...[
if(!widget.allowTargetInteraction)
_TargetWidget(
offset: rectBound.topLeft,
size: size,
Expand Down

0 comments on commit 4676618

Please sign in to comment.