setBPM method

  1. @override
Future<void> setBPM(
  1. int bpm
)
override

Implementation

@override
Future<void> setBPM(int bpm) async {
  if (bpm <= 0) {
    throw Exception('BPM must be greater than 0');
  }
  try {
    await methodChannel.invokeMethod<void>('setBPM', {
      'bpm': bpm,
    });
  } catch (e) {
    if (kDebugMode) {
      print(e);
    }
  }
}