setRepeatMode method
- Repeat mode
Set the repeat mode.
Implementation
Future<bool> setRepeatMode(Repeat mode) async {
if (Platform.isIOS) {
String mymode = "";
switch (mode.index) {
case 0:
mymode = "none";
break;
case 1:
mymode = "one";
break;
case 2:
mymode = "all";
break;
default:
throw "Incorrent mode!";
}
bool result = await playerChannel.invokeMethod('setRepeatMode', <String, dynamic>{"mode": mymode});
return result;
} else {
throw PlatformException(
code: "Device is not iOS!",
message:
"Currently only iOS is supported. Feel free to contribute to Playify to help support Android.");
}
}