mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-09 18:50:11 +08:00
@@ -91,15 +91,15 @@ class DownloadUtils {
|
||||
final androidInfo = await DeviceInfoPlugin().androidInfo;
|
||||
if (androidInfo.version.sdkInt <= 32) {
|
||||
if (!context.mounted) return false;
|
||||
return await requestStoragePer(context);
|
||||
return requestStoragePer(context);
|
||||
} else {
|
||||
return await requestPhotoPer();
|
||||
return requestPhotoPer();
|
||||
}
|
||||
}
|
||||
return await requestStoragePer(context);
|
||||
return requestStoragePer(context);
|
||||
}
|
||||
|
||||
static Future downloadLivePhoto({
|
||||
static Future<bool> downloadLivePhoto({
|
||||
required BuildContext context,
|
||||
required String url,
|
||||
required String liveUrl,
|
||||
@@ -108,7 +108,7 @@ class DownloadUtils {
|
||||
}) async {
|
||||
try {
|
||||
if (!await checkPermissionDependOnSdkInt(context)) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
SmartDialog.showLoading(msg: '正在下载');
|
||||
|
||||
@@ -168,12 +168,12 @@ class DownloadUtils {
|
||||
}
|
||||
}
|
||||
|
||||
static Future downloadImg(
|
||||
static Future<bool> downloadImg(
|
||||
BuildContext context,
|
||||
List<String> imgList, {
|
||||
String imgType = 'cover',
|
||||
}) async {
|
||||
if (!await checkPermissionDependOnSdkInt(context)) return;
|
||||
if (!await checkPermissionDependOnSdkInt(context)) return false;
|
||||
final cancelToken = CancelToken();
|
||||
SmartDialog.showLoading(
|
||||
msg: '正在下载原图',
|
||||
|
||||
Reference in New Issue
Block a user