mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt live room
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -40,14 +40,25 @@ class Utils {
|
||||
return _isIpad!;
|
||||
}
|
||||
|
||||
static Future<Rect?> get sharePositionOrigin async {
|
||||
if (await Utils.isIpad()) {
|
||||
final size = Get.size;
|
||||
return Rect.fromLTWH(
|
||||
0,
|
||||
0,
|
||||
size.width,
|
||||
size.height / 2,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future<void> shareText(String text) async {
|
||||
try {
|
||||
SharePlus.instance.share(
|
||||
ShareParams(
|
||||
text: text,
|
||||
sharePositionOrigin: await Utils.isIpad()
|
||||
? Rect.fromLTWH(0, 0, Get.width, Get.height / 2)
|
||||
: null,
|
||||
sharePositionOrigin: await sharePositionOrigin,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user