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 {
81
81
this .showArrow = true ,
82
82
this .onTargetClick,
83
83
this .disposeOnTap,
84
+ this .autoPlayDelay,
84
85
this .movingAnimationDuration = const Duration (milliseconds: 2000 ),
85
86
this .disableMovingAnimation,
86
87
this .disableScaleAnimation,
@@ -184,6 +185,7 @@ class Showcase extends StatefulWidget {
184
185
this .scrollLoadingWidget = Constants .defaultProgressIndicator,
185
186
this .onTargetClick,
186
187
this .disposeOnTap,
188
+ this .autoPlayDelay,
187
189
this .movingAnimationDuration = Constants .defaultAnimationDuration,
188
190
this .disableMovingAnimation,
189
191
this .targetPadding = EdgeInsets .zero,
@@ -346,6 +348,9 @@ class Showcase extends StatefulWidget {
346
348
/// Default to [Duration(milliseconds: 2000)]
347
349
final Duration movingAnimationDuration;
348
350
351
+ /// The delay before the next play start.
352
+ final Duration ? autoPlayDelay;
353
+
349
354
/// Triggered when default tooltip is tapped
350
355
final VoidCallback ? onToolTipClick;
351
356
Original file line number Diff line number Diff line change @@ -424,7 +424,12 @@ class ShowcaseView {
424
424
425
425
if (autoPlay) {
426
426
_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
+ );
428
433
}
429
434
}
430
435
You can’t perform that action at this time.
0 commit comments