@@ -62,20 +62,20 @@ class ShowcaseView {
6262 /// options like auto-play, animation, and many more.
6363 ShowcaseView .register ({
6464 this .scope = Constants .defaultScope,
65- this .onFinish,
6665 this .onStart,
66+ this .onFinish,
6767 this .onComplete,
6868 this .onDismiss,
69+ this .enableShowcase = true ,
6970 this .autoPlay = false ,
7071 this .autoPlayDelay = Constants .defaultAutoPlayDelay,
7172 this .enableAutoPlayLock = false ,
72- this .blurValue = 0 ,
73- this .scrollDuration = Constants .defaultScrollDuration,
74- this .disableMovingAnimation = false ,
75- this .disableScaleAnimation = false ,
7673 this .enableAutoScroll = false ,
74+ this .scrollDuration = Constants .defaultScrollDuration,
7775 this .disableBarrierInteraction = false ,
78- this .enableShowcase = true ,
76+ this .disableScaleAnimation = false ,
77+ this .disableMovingAnimation = false ,
78+ this .blurValue = 0 ,
7979 this .globalTooltipActionConfig,
8080 this .globalTooltipActions,
8181 this .globalFloatingActionWidget,
@@ -263,10 +263,6 @@ class ShowcaseView {
263263 if (! _mounted) return ;
264264
265265 _cleanupAfterSteps ();
266- OverlayManager .instance.update (
267- show: isShowcaseRunning,
268- scope: scope,
269- );
270266 }
271267
272268 /// Cleans up resources when unregistering the showcase view.
@@ -321,7 +317,7 @@ class ShowcaseView {
321317 _ids = widgetIds;
322318 _activeWidgetId = 0 ;
323319 _onStart ();
324- // OverlayManager.instance.update(show: isShowcaseRunning, scope: scope);
320+ OverlayManager .instance.update (show: isShowcaseRunning, scope: scope);
325321 } else {
326322 Future .delayed (delay, () => _startShowcase (Duration .zero, widgetIds));
327323 }
@@ -344,12 +340,13 @@ class ShowcaseView {
344340 (_) {
345341 if (! _mounted) return ;
346342 _activeWidgetId = id;
347- _onStart ();
343+
348344 if (_activeWidgetId! >= _ids! .length) {
349345 _cleanupAfterSteps ();
350346 onFinish? .call ();
347+ } else {
348+ _onStart ();
351349 }
352- OverlayManager .instance.update (show: isShowcaseRunning, scope: scope);
353350 },
354351 );
355352 }
@@ -418,7 +415,7 @@ class ShowcaseView {
418415 await firstController? .scrollIntoView ();
419416 } else {
420417 for (var i = 0 ; i < controllerLength; i++ ) {
421- controllers[i].startShowcase (shouldUpdateOverlay: i == 0 );
418+ controllers[i].setupShowcase (shouldUpdateOverlay: i == 0 );
422419 }
423420 }
424421 }
@@ -468,6 +465,7 @@ class ShowcaseView {
468465 void _cleanupAfterSteps () {
469466 _ids = _activeWidgetId = null ;
470467 _cancelTimer ();
468+ OverlayManager .instance.update (show: isShowcaseRunning, scope: scope);
471469 }
472470
473471 @override
0 commit comments