From 169f72057c2058e19544443f81b8b06d8b32ac2e Mon Sep 17 00:00:00 2001 From: iotserv Date: Sat, 23 Sep 2023 15:22:19 +0800 Subject: [PATCH] tag --- CHANGELOG.md | 4 ++++ lib/plugins/openWithChoice/OpenWithChoice.dart | 7 ++++--- pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3d3be2..50311c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.0.0+3] + +* update + ## [1.0.0+2] * update diff --git a/lib/plugins/openWithChoice/OpenWithChoice.dart b/lib/plugins/openWithChoice/OpenWithChoice.dart index e17759a..f64e852 100644 --- a/lib/plugins/openWithChoice/OpenWithChoice.dart +++ b/lib/plugins/openWithChoice/OpenWithChoice.dart @@ -8,6 +8,7 @@ import 'package:openiothub_plugin/plugins/openWithChoice/aria2/Aria2Page.dart'; import 'package:openiothub_plugin/plugins/openWithChoice/sshWeb/SSHWebPage.dart'; import 'package:openiothub_plugin/plugins/openWithChoice/vncWeb/VNCWebPage.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher_string.dart'; import 'package:webview_flutter/webview_flutter.dart'; class OpenWithChoice extends StatelessWidget { @@ -180,7 +181,7 @@ class OpenWithChoice extends StatelessWidget { Navigator.of(ctx).pop(); }); } else if (title == 'Web') { - if (Platform.isIOS) { + if (Platform.isIOS || Platform.isWindows || Platform.isMacOS || Platform.isLinux) { _launchURL("http://${Config.webgRpcIp}:${portConfig.localProt}"); } else { WebViewController controller = WebViewController() @@ -244,8 +245,8 @@ class OpenWithChoice extends StatelessWidget { } _launchURL(String url) async { - if (await canLaunch(url)) { - await launch(url); + if (await canLaunchUrlString(url)) { + await launchUrlString(url); } else { print('Could not launch $url'); } diff --git a/pubspec.yaml b/pubspec.yaml index c57c81b..7fa5023 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: openiothub_plugin description: openiothub_plugin -version: 1.0.0+2 +version: 1.0.0+3 homepage: https://github.com/OpenIoTHub environment: