playReplay method
void
playReplay()
Implementation
void playReplay() {
if (!_isReplayMode) return;
_isReplaying = true;
_replayTimer?.cancel();
final intervalMs = (1000 / _replaySpeed).round().clamp(100, 3000);
_replayTimer = Timer.periodic(Duration(milliseconds: intervalMs), (_) {
if (_replayIndex != null &&
_replayIndex! < _candleBuilder.candles.length - 1) {
_replayIndex = _replayIndex! + 1;
_recalculateIndicators();
notifyListeners();
} else {
pauseReplay();
}
});
notifyListeners();
}