stopVideoRecorder method
dynamic
stopVideoRecorder()
Implementation
stopVideoRecorder() async {
try {
if (recording) {
final video = await _controller!.stopVideoRecording();
final bytes = File(video.path).readAsBytesSync();
final base64Video = base64Encode(bytes);
setState(() {
recording = false;
});
return base64Video;
}
return '';
} catch (e) {
if (kDebugMode) {
print(e);
}
return '';
}
}