up static method

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

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

Implementation

static Future<double> up({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("volumeUp", <String, dynamic>{'step': step});
    if (vol != null) return Future.value(vol);
    return Future.value(0);
  }
}