pickImages method
limit is the maximum number of images that can be selected. If it is 0, there is no limit.
compressionQuality is the quality of the image compression. The value is between 0.0 and 1.0.
width and height are the width and height of the image.
Implementation
Future<List<XFile>?> pickImages({
int limit = 0,
int? maxWidth,
int? maxHeight,
double compressionQuality = 1.0,
}) async {
final List<dynamic>? resultList =
await methodChannel.invokeMethod('pickImage', {
"limit": limit,
'compressionQuality': compressionQuality,
'maxWidth': maxWidth,
'maxHeight': maxHeight,
});
if (resultList == null) {
return null;
}
final uint8ListList = _nativeResultToUint8ListList(resultList);
final xFileList = await _uint8ListListToXFileList(uint8ListList);
return xFileList;
}