Ecard Download
This commit is contained in:
parent
bf169e6c88
commit
20ef0b593c
@ -446,12 +446,12 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
Future<void> _launchURL(String url) async {
|
Future<void> _launchURL(String url) async {
|
||||||
final Uri uri = Uri.parse(url); // Parse the URL properly
|
final Uri uri = Uri.parse(url); // Parse the URL properly
|
||||||
logDebug('_launchURL $uri');
|
logDebug('_launchURL $uri');
|
||||||
if (uri != null) {
|
|
||||||
logDebug('If $uri');
|
logDebug('If $uri');
|
||||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
if (kIsWeb) {
|
||||||
|
// Open in current browser tab on web.
|
||||||
|
await launchUrl(uri, webOnlyWindowName: '_self');
|
||||||
} else {
|
} else {
|
||||||
logDebug('else $uri');
|
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||||
throw 'Could not launch $url';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user