pickVideo static method
Future<XFile?>
pickVideo({
- required ImageSource source,
- CameraDevice preferredCameraDevice = CameraDevice.rear,
- Duration? maxDuration,
Implementation
static Future<XFile?> pickVideo({
required ImageSource source,
CameraDevice preferredCameraDevice = CameraDevice.rear,
Duration? maxDuration,
}) async {
try {
final ImagePicker picker = ImagePicker();
final XFile? video = await picker.pickVideo(
source: source,
preferredCameraDevice: preferredCameraDevice,
maxDuration: maxDuration,
);
return video;
} catch (e) {
LoggerService.logError('Utils pickVideo: could not pick video: $e');
}
return null;
}