selfprivacy.org.app/lib/utils/launch_url.dart
Inex Code e186dac39f fix(ui): Deduplicated launch_url functions
Also fixed issue of calling URI with duplicate protocol

Closes: #184
2023-02-01 01:11:50 +03:00

14 lines
247 B
Dart

import 'package:url_launcher/url_launcher.dart';
void launchURL(final url) async {
try {
final Uri uri = Uri.parse(url);
await launchUrl(
uri,
mode: LaunchMode.externalApplication,
);
} catch (e) {
print(e);
}
}