setVideoIndex method

Future<void> setVideoIndex(
  1. int index
)

Sets the playing video with the one found in the playlist at the index provided. The index provided should be a numeric value between 0 and the total number of videos in the current playlist - 1. If the index provided is less than 0 or greater or equal with the total number of videos, the method shows an error message and returns

  • index The index of the desired video in the playlist

Implementation

Future<void> setVideoIndex(int index) async {
  await _methodChannel.invokeMethod<void>('setVideoIndex', index);
}