down static method

Future<double> down(
  1. {double step = _defaultStep}
)

decrease system volume by step, step must be in range 0.0, 1.0. return the system volume value after decrease. the return volume value may be not equals to the current volume - step.

Implementation

static Future<double> down({double step = _defaultStep}) async {
  if (step < 0.0 || step > 1.0) {
    return Future.error(ArgumentError.value(
        step, "step must be not null and in range [0.0, 1.0]"));
  } else {
    var vol = await FijkPlugin._channel
        .invokeMethod("volumeDown", <String, dynamic>{'step': step});
    if (vol != null) return Future.value(vol);
    return Future.value(0);
  }
}