getMultiVideoWithOptions method
Future<List<XFile> >
getMultiVideoWithOptions({
- MultiVideoPickerOptions options = const MultiVideoPickerOptions(),
Returns a List<XFile> with the videos that were picked.
The videos come from the ImageSource.gallery.
The options argument controls additional settings that can be used when
picking a video. See MultiVideoPickerOptions for more details.
If no videos were picked, returns an empty list.
Implementation
@override
Future<List<XFile>> getMultiVideoWithOptions({
MultiVideoPickerOptions options = const MultiVideoPickerOptions(),
}) async {
// TODO(stuartmorgan): Add a native implementation that can use
// PHPickerViewController on macOS 13+, with this as a fallback for
// older OS versions: https://github.com/flutter/flutter/issues/125829.
const typeGroup = XTypeGroup(
uniformTypeIdentifiers: <String>['public.movie'],
);
final List<XFile> files = await fileSelector.openFiles(
acceptedTypeGroups: <XTypeGroup>[typeGroup],
);
return files;
}