stopRecording method

Future<File?> stopRecording()

used to stop native recording

Implementation

Future<File?> stopRecording() async {
  try {
    final result = await _channel.invokeMethod('stopRecording');
    // log(" ${result['localPath']} ${result['localPath'].runtimeType}");
    return File(result['localPath']);
  } catch (e) {
    log('Error stopping recording: $e');
    return null;
  }
}