Skip to content

Commit

Permalink
feat: ✨ Add disabling auto scroll(disableAutoScroll) for concreate to…
Browse files Browse the repository at this point in the history
…oltip (Showcase)
  • Loading branch information
Sensirex committed Aug 14, 2023
1 parent 5ee2d91 commit 9addc09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/showcase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ class Showcase extends StatefulWidget {
/// will still provide a callback.
final VoidCallback? onBarrierClick;

final bool disableAutoScroll;
const Showcase({
required this.key,
required this.description,
Expand Down Expand Up @@ -288,6 +289,7 @@ class Showcase extends StatefulWidget {
this.titleTextDirection,
this.descriptionTextDirection,
this.onBarrierClick,
this.disableAutoScroll = false
}) : height = null,
width = null,
container = null,
Expand Down Expand Up @@ -325,6 +327,7 @@ class Showcase extends StatefulWidget {
this.disableDefaultTargetGestures = false,
this.tooltipPosition,
this.onBarrierClick,
this.disableAutoScroll = false
}) : showArrow = false,
onToolTipClick = null,
scaleAnimationDuration = const Duration(milliseconds: 300),
Expand Down Expand Up @@ -386,7 +389,7 @@ class _ShowcaseState extends State<Showcase> {
});

if (activeStep == widget.key) {
if (showCaseWidgetState.enableAutoScroll) {
if (showCaseWidgetState.enableAutoScroll && !this.widget.disableAutoScroll) {
_scrollIntoView();
}

Expand Down

0 comments on commit 9addc09

Please sign in to comment.