mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 手动下载图片质量提升为100%,新增错误提示
This commit is contained in:
@@ -26,7 +26,7 @@ class DownloadUtils {
|
|||||||
"plpl_${imgType}_${DateTime.now().toString().split('-').join()}";
|
"plpl_${imgType}_${DateTime.now().toString().split('-').join()}";
|
||||||
final SaveResult result = await SaverGallery.saveImage(
|
final SaveResult result = await SaverGallery.saveImage(
|
||||||
Uint8List.fromList(response.data),
|
Uint8List.fromList(response.data),
|
||||||
quality: 60,
|
quality: 100,
|
||||||
name: picName,
|
name: picName,
|
||||||
// 保存到 PiliPala文件夹
|
// 保存到 PiliPala文件夹
|
||||||
androidRelativePath: "Pictures/PiliPala",
|
androidRelativePath: "Pictures/PiliPala",
|
||||||
@@ -35,6 +35,8 @@ class DownloadUtils {
|
|||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
if (result.isSuccess) {
|
if (result.isSuccess) {
|
||||||
await SmartDialog.showToast('「$picName」已保存 ');
|
await SmartDialog.showToast('「$picName」已保存 ');
|
||||||
|
} else {
|
||||||
|
await SmartDialog.showToast('保存失败,${result.errorMessage}');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user