setShuffle static method

Future setShuffle({
  1. required bool shuffle,
})

Sets the shuffle mode

Set shuffle to true or false. Throws a PlatformException if adding failed Throws a MissingPluginException if the method is not implemented on the native platforms.

Implementation

static Future setShuffle({required bool shuffle}) async {
  try {
    return _channel.invokeMethod(MethodNames.setShuffle, {
      ParamNames.shuffle: shuffle,
    });
  } on Exception catch (e) {
    _logException(MethodNames.setShuffle, e);
    rethrow;
  }
}