setVolume method

Future<bool> setVolume(
  1. double volume
)

Sets valume for this player. Dosen't throw Exception. Returns false if it couldn't set the volume.

Volume has to be between 0.0 to 1.0.

Implementation

Future<bool> setVolume(double volume) async {
  final result = await AudioWaveformsInterface.instance
      .setVolume(volume, _playerKey.toString());
  return result;
}