setMusicPitch method

Future<void> setMusicPitch(
  1. int id,
  2. double pitch
)

Adjust the pitch of background music

Parameters:

id Music track ID

pitch Pitch. Default value: 0.0f. Value range: floating point number between [-1,1];

Implementation

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