login with webview on windows and linux.

fix #162, fix #141
This commit is contained in:
2025-01-31 11:53:06 +08:00
parent d675af3fb4
commit 9ea749a84a
2 changed files with 67 additions and 4 deletions

View File

@@ -303,7 +303,10 @@ class DesktopWebview {
proxy: AppDio.proxy,
));
_webview!.addOnWebMessageReceivedCallback(onMessage);
_webview!.setOnNavigation((s) => onNavigation?.call(s, this));
_webview!.setOnNavigation((s) {
s = s.substring(1, s.length - 1);
return onNavigation?.call(s, this);
});
_webview!.launch(initialUrl, triggerOnUrlRequestEvent: false);
_runTimer();
_webview!.onClose.then((value) {