setLooping method

Future<void> setLooping(
  1. bool looping
)

Enables/disables looping (infinity playback) mode.

Implementation

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

  await videoPlayerController!.setLooping(looping);
}