stop method
Implementation
Future<void> stop() async {
_isRecording = false;
await _subscription?.cancel();
_subscription = null;
try {
if (_recorder != null && await _recorder!.isRecording()) {
await _recorder!.stop();
}
} catch (_) {}
await _recorder?.dispose();
_recorder = null;
}