startDetection method

  1. @override
Future<void> startDetection({
  1. int? sampleRate,
  2. int? bufferSize,
  3. int? overlap,
})
override

Implementation

@override
Future<void> startDetection({
  int? sampleRate,
  int? bufferSize,
  int? overlap,
}) async {
  try {
    await _methodChannel.invokeMethod('startDetection', {
      'sampleRate': sampleRate,
      'bufferSize': bufferSize,
      'overlap': overlap,
    });
  } on PlatformException catch (e) {
    throw Exception('Failed to start detection: ${e.message}');
  }
}