opt live room

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-01 16:41:24 +08:00
parent dd5c2229b3
commit 53ef4219eb
11 changed files with 175 additions and 201 deletions

View File

@@ -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) {