From 097199c4f12781e24006ad41fa1d2dafd20288d3 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 14:59:32 -0400 Subject: [PATCH] Replace deprecated canLaunch and launch --- lib/services/utils.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/services/utils.dart b/lib/services/utils.dart index 40ce317..a5625bb 100644 --- a/lib/services/utils.dart +++ b/lib/services/utils.dart @@ -4,7 +4,7 @@ import 'package:file_picker/file_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class Utils { /// Minimum size (width or height) of a interactive component @@ -158,8 +158,8 @@ class Utils { } static launchUrl(String url, BuildContext context) async { - if (await canLaunch(url)) { - await launch(url); + if (await canLaunchUrlString(url)) { + await launchUrlString(url); } else { Utils.popError(context, 'Error', 'Could not launch web view'); }