mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Bug fixes
This commit is contained in:
parent
51b8a6b610
commit
a666d109d9
8 changed files with 54 additions and 20 deletions
|
@ -5,6 +5,15 @@ import 'package:url_launcher/url_launcher.dart' as url_launcher;
|
|||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
void openUrl(String url) async {
|
||||
if (!(url.startsWith("http") || url.startsWith("https"))) {
|
||||
try {
|
||||
url_launcher.launchUrl(Uri.parse(url));
|
||||
} catch (e, stackTrace) {
|
||||
Sentry.captureException(e, stackTrace: stackTrace);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
try {
|
||||
await flutter_custom_tabs.launchUrl(
|
||||
|
@ -20,6 +29,7 @@ void openUrl(String url) async {
|
|||
),
|
||||
);
|
||||
} catch (e, stackTrace) {
|
||||
url_launcher.launchUrl(Uri.parse(url));
|
||||
Sentry.captureException(e, stackTrace: stackTrace);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue