isLooping method

  1. @override
Future<void> isLooping(
  1. bool isLooping
)
override

Sets the replay mode of the audio.

This method sends a request to the platform to set whether the currently playing audio should replay automatically when it reaches the end. If isLooping is true, the audio will replay indefinitely. If isLooping is false, the audio will play once and then stop.

isReplay: A boolean value indicating whether the audio should replay.

Implementation

@override
Future<void> isLooping(bool isLooping) async {
  try {
    await methodChannel.invokeMethod<void>('isLooping', {'isLooping': isLooping});
  } on PlatformException catch (e) {
    throw PlatformException(code: e.code, message: e.message);
  }
}