From 043691114974467bf841c2d93a751e074e37a441 Mon Sep 17 00:00:00 2001 From: rubuy-74 Date: Fri, 28 Jul 2023 00:34:14 +0100 Subject: [PATCH] Manually format current files --- uni/lib/controller/networking/url_launcher.dart | 7 +++---- uni/lib/view/schedule/widgets/schedule_slot.dart | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) 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