startUpdatePositionTimer method

void startUpdatePositionTimer()

Implementation

void startUpdatePositionTimer() {
  _positionTimer?.cancel();
  _positionTimer = Timer.periodic(_positionUpdateInterval, (_) {
    getCurrentTime().then((currentTime) {
      value = value.copyWith(position: currentTime);
    }).catchError((e) {
      if (e is PlatformException && e.code == 'player-disposed') return;
      throw e;
    });
  });
}