launchUrl method

Future<void> launchUrl(
  1. String url
)

Implementation

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';
}