stopListening method

Future<bool> stopListening()

Attempts to close the microphone stream.

Implementation

Future<bool> stopListening() async {
  if (_augnitoMicStream.isRecording) {
    _audioStream?.cancel();
    return await _augnitoMicStream.stopRecording();
  }
  return true;
}