startDetection method
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}');
}
}