pause method

Future<void> pause()

Stop video playback.

Implementation

Future<void> pause() async {
  if (videoPlayerController == null) {
    throw StateError("The data source has not been initialized");
  }

  await videoPlayerController!.pause();
  _postEvent(BetterPlayerEvent(BetterPlayerEventType.pause));
}