Skip to content

Commit

Permalink
Manually format current files
Browse files Browse the repository at this point in the history
  • Loading branch information
rubuy-74 committed Jul 27, 2023
1 parent edaba7b commit 0436911
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions uni/lib/controller/networking/url_launcher.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import 'package:uni/view/common_widgets/toast_message.dart';
import 'package:url_launcher/url_launcher.dart';

Future<void> launchUrlWithToast(context,url) async {
if(await canLaunchUrl(Uri.parse(url)) && url!=''){
Future<void> 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');
}
}

3 changes: 1 addition & 2 deletions uni/lib/view/schedule/widgets/schedule_slot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0436911

Please sign in to comment.