opt: in-app webview

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-15 12:26:44 +08:00
parent 4b48aba2ae
commit d9611cce80
4 changed files with 41 additions and 6 deletions

View File

@@ -420,6 +420,29 @@ class Utils {
);
}
static void inAppWebview(
String url, {
bool off = false,
}) {
if (GStorage.openInBrowser) {
launchURL(url);
} else {
if (off) {
Get.offNamed(
'/webview',
parameters: {'url': url},
arguments: {'inApp': true},
);
} else {
Get.toNamed(
'/webview',
parameters: {'url': url},
arguments: {'inApp': true},
);
}
}
}
static void handleWebview(
String url, {
bool off = false,