mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 07:06:14 +08:00
upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -33,15 +33,13 @@ class ImageUtil {
|
||||
var path = '${temp.path}/$name';
|
||||
File(path).writeAsBytesSync(response.data);
|
||||
|
||||
Rect? sharePositionOrigin;
|
||||
if (await Utils.isIpad()) {
|
||||
sharePositionOrigin = Rect.fromLTWH(0, 0, Get.width, Get.height / 2);
|
||||
}
|
||||
|
||||
Share.shareXFiles(
|
||||
[XFile(path)],
|
||||
subject: url,
|
||||
sharePositionOrigin: sharePositionOrigin,
|
||||
SharePlus.instance.share(
|
||||
ShareParams(
|
||||
files: [XFile(path)],
|
||||
sharePositionOrigin: await Utils.isIpad()
|
||||
? Rect.fromLTWH(0, 0, Get.width, Get.height / 2)
|
||||
: null,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
SmartDialog.showToast(e.toString());
|
||||
|
||||
@@ -42,13 +42,13 @@ class Utils {
|
||||
|
||||
static Future<void> shareText(String text) async {
|
||||
try {
|
||||
Rect? sharePositionOrigin;
|
||||
if (await isIpad()) {
|
||||
sharePositionOrigin = Rect.fromLTWH(0, 0, Get.width, Get.height / 2);
|
||||
}
|
||||
Share.share(
|
||||
text,
|
||||
sharePositionOrigin: sharePositionOrigin,
|
||||
SharePlus.instance.share(
|
||||
ShareParams(
|
||||
text: text,
|
||||
sharePositionOrigin: await Utils.isIpad()
|
||||
? Rect.fromLTWH(0, 0, Get.width, Get.height / 2)
|
||||
: null,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
SmartDialog.showToast(e.toString());
|
||||
|
||||
Reference in New Issue
Block a user