File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ class Showcase extends StatefulWidget {
8181 this .showArrow = true ,
8282 this .onTargetClick,
8383 this .disposeOnTap,
84+ this .autoPlayDelay,
8485 this .movingAnimationDuration = const Duration (milliseconds: 2000 ),
8586 this .disableMovingAnimation,
8687 this .disableScaleAnimation,
@@ -184,6 +185,7 @@ class Showcase extends StatefulWidget {
184185 this .scrollLoadingWidget = Constants .defaultProgressIndicator,
185186 this .onTargetClick,
186187 this .disposeOnTap,
188+ this .autoPlayDelay,
187189 this .movingAnimationDuration = Constants .defaultAnimationDuration,
188190 this .disableMovingAnimation,
189191 this .targetPadding = EdgeInsets .zero,
@@ -346,6 +348,9 @@ class Showcase extends StatefulWidget {
346348 /// Default to [Duration(milliseconds: 2000)]
347349 final Duration movingAnimationDuration;
348350
351+ /// The delay before the next play start.
352+ final Duration ? autoPlayDelay;
353+
349354 /// Triggered when default tooltip is tapped
350355 final VoidCallback ? onToolTipClick;
351356
Original file line number Diff line number Diff line change @@ -424,7 +424,12 @@ class ShowcaseView {
424424
425425 if (autoPlay) {
426426 _cancelTimer ();
427- _timer = Timer (autoPlayDelay, () => next (force: true ));
427+ // Showcase is first.
428+ final config = _getCurrentActiveControllers.firstOrNull? .config;
429+ _timer = Timer (
430+ config? .autoPlayDelay ?? autoPlayDelay,
431+ () => next (force: true ),
432+ );
428433 }
429434 }
430435
You can’t perform that action at this time.
0 commit comments