TetraStats/lib/utils/open_in_browser.dart

10 lines
243 B
Dart

import 'package:url_launcher/url_launcher.dart';
Future<void> launchInBrowser(Uri url) async {
if (!await launchUrl(
url,
mode: LaunchMode.externalApplication,
)) {
throw Exception('Could not launch $url');
}
}