mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-08 03:54:49 +08:00
darwin SPM
upgrade deps Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user