setVol static method
set system volume to vol
.
the range of vol
is 0.0, 1,0
.
return the system volume value after set.
Implementation
static Future<double?> setVol(double vol) {
if (vol < 0.0 || vol > 1.0) {
return Future.error(
ArgumentError.value(vol, "step must in range [0.0, 1.0]"));
} else {
return FijkPlugin._channel
.invokeMethod("volumeSet", <String, dynamic>{'vol': vol});
}
}