getMultiImageWithOptions method
Future<List<XFile> >
getMultiImageWithOptions({
- MultiImagePickerOptions options = const MultiImagePickerOptions(),
Returns a List<XFile> with the images that were picked.
The images come from the ImageSource.gallery
.
The options
argument controls additional settings that can be used when
picking an image. See MultiImagePickerOptions
for more details.
If no images were picked, returns an empty list.
Implementation
@override
Future<List<XFile>> getMultiImageWithOptions({
MultiImagePickerOptions options = const MultiImagePickerOptions(),
}) async {
final List<dynamic> paths = await _getMultiImagePath(
maxWidth: options.imageOptions.maxWidth,
maxHeight: options.imageOptions.maxHeight,
imageQuality: options.imageOptions.imageQuality,
limit: options.limit,
);
if (paths.isEmpty) {
return <XFile>[];
}
return paths.map((dynamic path) => XFile(path as String)).toList();
}