currentTime property

double? get currentTime

Implementation

double? get currentTime {
  if (_isIdle || _isCurrentTimePending) return null;
  return _currentTime;
}
set currentTime (double? newTime)

Implementation

set currentTime(double? newTime) {
  if (newTime == null) return;

  if (!_isPaused && _startTime != null) {
    _startTime = _timeline!.currentTime! - newTime / _playbackRate;
  }

  _isCurrentTimePending = false;
  if (_currentTime == newTime) return;

  if (_isIdle) {
    _isIdle = false;
    _isPaused = true;
  }
  _tickCurrentTime(newTime, true);
}