close method

  1. @override
Future<void> close()

Closes the instance. This method should be called when the instance is no longer needed. Once close is called, the instance can no longer be used.

Implementation

@override
Future<void> close() {
  try {
    _myRecorder.closeAudioSession();
  } catch (e) {
    //ignore
  }
  if (recorderStream != null) recorderStream!.cancel();
  try {
    // _myRecorder = null;
    // timer.cancel();
  } catch (e) {
    //ignore
  }
  return super.close();
}