openUrl method
Future<bool>
openUrl(
- String url, {
- LaunchMode mode = LaunchMode.platformDefault,
- WebViewConfiguration webViewConfiguration = const WebViewConfiguration(),
- String? webOnlyWindowName,
打开连接 Open the connection
Implementation
Future<bool> openUrl(
String url, {
LaunchMode mode = LaunchMode.platformDefault,
WebViewConfiguration webViewConfiguration = const WebViewConfiguration(),
String? webOnlyWindowName,
}) async {
if (await canLaunchUrl(Uri.parse(url))) {
return await launchUrl(Uri.parse(url),
mode: mode,
webOnlyWindowName: webOnlyWindowName,
webViewConfiguration: webViewConfiguration);
} else {
return false;
}
}