onIsPlayingChanged method

  1. @override
void onIsPlayingChanged(
  1. bool isPlaying
)
override

Implementation

@override
void onIsPlayingChanged(bool isPlaying) {
  value = value.copyWith(
    isPlaying: isPlaying,
    error: isPlaying ? null : value.error,
  );
  isPlaying ? startUpdatePositionTimer() : stopUpdatePositionTimer();
}