# setMusicSpeedRate method Null safety

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`;

## Implementation

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