Future<void> launchUrl(String url) async { if (!url.startsWith(RegExp('https?://'))) { url = "http://" + url; } await canLaunch(url) ? await launch(url) : throw 'Could not launch $url'; }