pickVideo static method
Future<UFileData?>
pickVideo({
- UImageSource source = UImageSource.gallery,
- UCameraOptions options = const UCameraOptions(),
- dynamic action()?,
Implementation
static Future<UFileData?> pickVideo({
UImageSource source = UImageSource.gallery,
UCameraOptions options = const UCameraOptions(),
Function(UFileData?)? action,
}) async {
if (source == UImageSource.camera) return recordVideo(options: options, action: action);
final List<UFileData> files = await showFilePicker(fileType: FileType.video);
final UFileData? file = files.isEmpty ? null : files.first;
action?.call(file);
return file;
}