setVolume static method

Future<bool> setVolume(
  1. double volume
)

This method allows you to set a value for the system volume In Android you can put a value from 0.0 to Android max Volume In iOS you can put a value from 0.0 to 1.0

Implementation

static Future<bool> setVolume(double volume) async {
  return await _channel
      .invokeMethod(Constants.SET_VOLUME, {'volume': volume});
}