diff --git a/go.sum b/go.sum index 6b19da269..1d07bd8df 100644 --- a/go.sum +++ b/go.sum @@ -293,7 +293,7 @@ github.com/getlantern/fdcount v0.0.0-20210503151800-5decd65b3731/go.mod h1:XZwE+ github.com/getlantern/filepersist v0.0.0-20160317154340-c5f0cd24e799/go.mod h1:8DGAx0LNUfXNnEH+fXI0s3OCBA/351kZCiz/8YSK3i8= github.com/getlantern/filepersist v0.0.0-20210901195658-ed29a1cb0b7c h1:mcz27xtAkb1OuOLBct/uFfL1p3XxAIcFct82GbT+UZM= github.com/getlantern/filepersist v0.0.0-20210901195658-ed29a1cb0b7c/go.mod h1:8DGAx0LNUfXNnEH+fXI0s3OCBA/351kZCiz/8YSK3i8= -github.com/getlantern/flashlight/v7 v7.6.136 h1:SlscKLFtKtTk6DgZOhgqiuys+hhLOqVrQwZQIQtlDDs= +github.com/getlantern/flashlight/v7 v7.6.136 h1:t5+Z/rFQ7PZrD5tUH3a1EeYgDgUi1io+nioI602Qp9Q= github.com/getlantern/flashlight/v7 v7.6.136/go.mod h1:PNDmAgH5Y3+Gi7Fnl05f1MW1joM+djK5ukKIaEjJMZA= github.com/getlantern/framed v0.0.0-20190601192238-ceb6431eeede h1:yrU6Px3ZkvCsDLPryPGi6FN+2iqFPq+JeCb7EFoDBhw= github.com/getlantern/framed v0.0.0-20190601192238-ceb6431eeede/go.mod h1:nhnoiS6DE6zfe+BaCMU4YI01UpsuiXnDqM5S8jxHuuI= diff --git a/lib/core/app/app_webview.dart b/lib/core/app/app_webview.dart index db15cde31..6538e82be 100644 --- a/lib/core/app/app_webview.dart +++ b/lib/core/app/app_webview.dart @@ -155,8 +155,16 @@ Future initializeWebViewEnvironment() async { } // openWithSystemBrowser opens a URL in the browser -Future openWithSystemBrowser(String url) async => - await InAppBrowser.openWithSystemBrowser(url: WebUri(url)); +Future openWithSystemBrowser(String url) async { + switch (Platform.operatingSystem) { + case 'linux': + final webview = await WebviewWindow.create(); + webview.launch(url); + break; + default: + await InAppBrowser.openWithSystemBrowser(url: WebUri(url)); + } +} Future openWebview(BuildContext context, String url, [String? title]) async {