compressAndGetFile static method
压缩图片
file
文件
targetPath
保存路径
minWidth
宽度
minHeight
高度
quality
质量
Implementation
static Future<File?> compressAndGetFile(File file, String targetPath,
{int minWidth = 1920, int minHeight = 1080, int quality = 85}) async {
final File? result = await FlutterImageCompress.compressAndGetFile(
file.absolute.path,
targetPath,
minWidth: minWidth,
minHeight: minHeight,
quality: quality,
);
return result;
}