stepBy method
Implementation
void stepBy(int steps) {
if (disabled != true) {
if (loop == true) {
_step += steps;
if (step >= slides.length) {
_disableSlideAnimation();
_step = 0;
} else if (step < 0) {
_disableSlideAnimation();
_step = slides.length - 1;
}
} else {
_step += steps;
if (step >= slides.length || step < 0) {
_step -= steps;
return;
}
}
_onStepController.add(step);
timer?.cancel();
if (duration != null) {
timer = Timer(Duration(milliseconds: duration!), () => stepBy(1));
}
_changeDetectorRef.markForCheck();
}
}