Skip to content

Commit

Permalink
tag
Browse files Browse the repository at this point in the history
  • Loading branch information
matteriot committed Sep 23, 2023
1 parent 853dc22 commit 169f720
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.0.0+3]

* update

## [1.0.0+2]

* update
Expand Down
7 changes: 4 additions & 3 deletions lib/plugins/openWithChoice/OpenWithChoice.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 169f720

Please sign in to comment.