stop method

Future<String?> stop()

Stop recording and get the video file path

Implementation

Future<String?> stop() async {
  if (!_isRecording) return null;
  _isRecording = false;
  _timer?.cancel();

  try {
    await _channel.invokeMethod('stopRecording');
    onComplete?.call(_outputPath ?? '');
    return _outputPath;
  } catch (e) {
    _handleError(e.toString());
    return null;
  }
}