mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: in-app webview
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user