stop method

Future<Recording?> stop()

Request the recording to stop and will not be start, resume, pause anymore.

Implementation

Future<Recording?> stop() async {
  Map<String, Object> response;
  var result = await _channel.invokeMethod('stop');

  if(channelWS != null){
    channelWS!.sink.close();
    channelWS = null;
  }
  if (result != null) {
    print('sàdsfsdf2');
    print(result);
    response = Map.from(result);
    print('sàdsfsdf');

    _responseToRecording(response);
  }
  _durationTimer?.cancel();
  return _recording;
}