diff --git a/uni/lib/controller/networking/url_launcher.dart b/uni/lib/controller/networking/url_launcher.dart index c350ab066..11c2242fd 100644 --- a/uni/lib/controller/networking/url_launcher.dart +++ b/uni/lib/controller/networking/url_launcher.dart @@ -1,11 +1,10 @@ import 'package:uni/view/common_widgets/toast_message.dart'; import 'package:url_launcher/url_launcher.dart'; -Future launchUrlWithToast(context,url) async { - if(await canLaunchUrl(Uri.parse(url)) && url!=''){ +Future launchUrlWithToast(context, url) async { + if (await canLaunchUrl(Uri.parse(url)) && url != '') { launchUrl(Uri.parse(url)); - }else{ + } else { ToastMessage.error(context, 'Could not launch this link'); } } - diff --git a/uni/lib/view/schedule/widgets/schedule_slot.dart b/uni/lib/view/schedule/widgets/schedule_slot.dart index 1faa16eb5..c94a14d63 100644 --- a/uni/lib/view/schedule/widgets/schedule_slot.dart +++ b/uni/lib/view/schedule/widgets/schedule_slot.dart @@ -4,7 +4,6 @@ import 'package:uni/controller/networking/network_router.dart'; import 'package:uni/view/common_widgets/row_container.dart'; import 'package:uni/view/common_widgets/url_launcher.dart'; - class ScheduleSlot extends StatelessWidget { final String subject; final String rooms; @@ -104,7 +103,7 @@ class SubjectButtonWidget extends StatelessWidget { _launchURL(context) async { final String url = toUcLink(occurrId); - await launchUrlWithToast(context,url); + await launchUrlWithToast(context, url); } @override