setMusicSpeedRate method

Future<void> setMusicSpeedRate(
  1. int id,
  2. double speedRate
)

Adjust the speed of background music

Parameters:

id Music track ID

speedRate Speed. Default value: 1.0f. Value range: floating point between [0.5,2];

Platform not supported:

  • web

Implementation

Future<void> setMusicSpeedRate(int id, double speedRate) {
  return _channel.invokeMethod(
      'setMusicSpeedRate', {"id": id, "speedRate": speedRate.toString()});
}