Skip to content

Commit

Permalink
✨ disableAnimation at ShowcaseWidget (SimformSolutionsPvtLtd#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
HappyMakadiyaS committed May 4, 2022
1 parent c680229 commit 7be4fdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/showcase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ class _ShowcaseState extends State<Showcase> {
contentWidth: widget.width,
onTooltipTap: _getOnTooltipTap,
contentPadding: widget.contentPadding,
disableAnimation: widget.disableAnimation,
disableAnimation:
ShowCaseWidget.of(context)!.disableAnimation ||
widget.disableAnimation,
animationDuration: widget.animationDuration,
),
],
Expand Down
4 changes: 4 additions & 0 deletions lib/src/showcase_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ShowCaseWidget extends StatefulWidget {
final bool autoPlay;
final Duration autoPlayDelay;
final bool autoPlayLockEnable;
final bool disableAnimation;
final Duration scrollDuration;

/// Default overlay blur used by showcase. if [Showcase.blurValue]
Expand All @@ -50,6 +51,7 @@ class ShowCaseWidget extends StatefulWidget {
this.autoPlayLockEnable = false,
this.blurValue = 0,
this.scrollDuration = const Duration(milliseconds: 300),
this.disableAnimation = false,
});

static GlobalKey? activeTargetWidget(BuildContext context) {
Expand All @@ -75,6 +77,7 @@ class ShowCaseWidgetState extends State<ShowCaseWidget> {
List<GlobalKey>? ids;
int? activeWidgetId;
late bool autoPlay;
late bool disableAnimation;
late Duration autoPlayDelay;
late bool autoPlayLockEnable;

Expand All @@ -86,6 +89,7 @@ class ShowCaseWidgetState extends State<ShowCaseWidget> {
super.initState();
autoPlayDelay = widget.autoPlayDelay;
autoPlay = widget.autoPlay;
disableAnimation = widget.disableAnimation;
autoPlayLockEnable = widget.autoPlayLockEnable;
}

Expand Down

0 comments on commit 7be4fdd

Please sign in to comment.