darwin SPM

upgrade deps

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-05-28 11:58:34 +08:00
parent f34505de6b
commit 364957cc78
14 changed files with 175 additions and 391 deletions

View File

@@ -26,7 +26,9 @@ import 'package:share_plus/share_plus.dart';
abstract final class ImageUtils {
static String get time =>
DateFormat('yyyy-MM-dd_HH-mm-ss').format(DateTime.now());
static const _androidRelativePath = 'Pictures/${Constants.appName}';
static final _albumPath = Platform.isAndroid
? 'Pictures/${Constants.appName}'
: Constants.appName;
// 图片分享
static Future<void> onShareImg(String url) async {
@@ -206,7 +208,7 @@ abstract final class ImageUtils {
SaveFileData(
filePath: i.filePath,
fileName: i.name,
androidRelativePath: _androidRelativePath,
albumPath: _albumPath,
),
);
} else {
@@ -306,7 +308,7 @@ abstract final class ImageUtils {
res = await SaverGallery.saveImage(
bytes,
fileName: fileName,
androidRelativePath: _androidRelativePath,
albumPath: _albumPath,
skipIfExists: false,
);
SmartDialog.dismiss();
@@ -350,7 +352,7 @@ abstract final class ImageUtils {
res = await SaverGallery.saveFile(
filePath: filePath,
fileName: fileName,
androidRelativePath: _androidRelativePath,
albumPath: _albumPath,
skipIfExists: false,
);
if (del) file.tryDel();