import 'package:url_launcher/url_launcher.dart' show canLaunchUrl, launchUrl; import 'package:url_launcher/url_launcher_string.dart'; /// Launches a [url] inside the app. launchURL(String url) async { var uri = Uri.parse(url); if (await canLaunchUrl(uri)) { await launchUrl(uri, mode: LaunchMode.externalApplication); } else { throw 'Could not launch $url'; } }