setLoop method
Sets the loop count for animation playback.
Parameters:
loop: Number of times to repeat the animation0: Play once (no repeat)- Positive number: Repeat that many times
-1: Infinite loop
Example:
await controller.setLoop(-1); // Infinite loop
await controller.setLoop(3); // Play 3 times
Implementation
Future<void> setLoop(int loop) async {
await __channel.invokeMethod('setLoop', {'loop': loop});
}